forked from xrg/behave-parallel
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconftest.py
More file actions
27 lines (21 loc) · 703 Bytes
/
Copy pathconftest.py
File metadata and controls
27 lines (21 loc) · 703 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# -*- coding: UTF-8 -*-
"""
Configure pytest environment.
Add project-specific information.
.. seealso::
* https://github.com/pytest-dev/pytest-html
"""
import behave
import pytest
@pytest.fixture(autouse=True)
def _annotate_environment(request):
"""Add project-specific information to test-run environment:
* behave.version
NOTE: autouse: Fixture is automatically used when test-module is imported.
"""
# -- USEFULL FOR: pytest --html=report.html ...
environment = getattr(request.config, "_environment", None)
if environment:
# -- PROVIDED-BY: pytest-html
behave_version = behave.__version__
environment.append(("behave", behave_version))