Skip to content

Commit fe74f46

Browse files
authored
Expected fail of lazy-fixture tests (#793)
1 parent f5db4f4 commit fe74f46

File tree

7 files changed

+38
-9
lines changed

7 files changed

+38
-9
lines changed

allure-behave/pyproject.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
[tool.poe.tasks]
22
linter = "flake8 --extend-ignore=A003 ./src"
3-
tests = """pytest ../tests/allure_behave"""
3+
4+
[tool.poe.tasks.tests]
5+
cmd = "pytest ../tests/allure_behave"
6+
env = { PYTEST_DISABLE_PLUGIN_AUTOLOAD = "true" }

allure-nose2/pyproject.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
[tool.poe.tasks]
22
linter = "flake8 ./src"
3-
tests = """pytest ../tests/allure_nose2"""
3+
4+
[tool.poe.tasks.tests]
5+
cmd = "pytest ../tests/allure_nose2"
6+
env = { PYTEST_DISABLE_PLUGIN_AUTOLOAD = "true" }

allure-pytest-bdd/pyproject.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
[tool.poe.tasks]
22
linter = "flake8 ./src"
3-
tests = "pytest ../tests/allure_pytest_bdd"
3+
4+
[tool.poe.tasks.tests]
5+
cmd = "pytest ../tests/allure_pytest_bdd"
6+
env = { PYTEST_DISABLE_PLUGIN_AUTOLOAD = "true" }

allure-pytest/pyproject.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
[tool.poe.tasks]
22
linter = "flake8 ./src"
3-
tests = "pytest ../tests/allure_pytest"
3+
4+
[tool.poe.tasks.tests]
5+
cmd = "pytest ../tests/allure_pytest"
6+
env = { PYTEST_DISABLE_PLUGIN_AUTOLOAD = "true" }

allure-robotframework/pyproject.toml

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[tool.poe.tasks]
22
linter = "flake8 ./src"
3-
tests = { shell = """python -m doctest ./src/listener/utils.py &&
4-
pytest ../tests/allure_robotframework
5-
""" }
3+
4+
[tool.poe.tasks.tests]
5+
shell = "python -m doctest ./src/listener/utils.py && pytest ../tests/allure_robotframework"
6+
env = { PYTEST_DISABLE_PLUGIN_AUTOLOAD = "true" }

pyproject.toml

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
[tool.poe.tasks]
22
linter = "flake8 ./allure-*/src ./tests"
3-
tests = "pytest"
4-
allure-collect = "pytest -p allure_pytest --alluredir ./.allure-results --clean-alluredir --allure-link-pattern issue:https://github.com/allure-framework/allure-python/issues/{0}"
53
allure-generate = "allure generate --clean --output ./.allure-report ./.allure-results"
64
allure-open = "allure open ./.allure-report"
75

6+
[tool.poe.tasks.tests]
7+
cmd = "pytest"
8+
env = { PYTEST_DISABLE_PLUGIN_AUTOLOAD = "true" }
9+
10+
[tool.poe.tasks.allure-collect]
11+
cmd = "pytest -p allure_pytest --alluredir ./.allure-results --clean-alluredir --allure-link-pattern issue:https://github.com/allure-framework/allure-python/issues/{0}"
12+
env = { PYTEST_DISABLE_PLUGIN_AUTOLOAD = "true" }
13+
814
[tool.pytest.ini_options]
915
testpaths = [
1016
"tests"

tests/allure_pytest/externals/pytest_lazy_fixture/pytest_lazy_fixture_test.py

+10
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@
77
from allure_commons_test.container import has_container
88
from allure_commons_test.container import has_before
99

10+
from packaging import version
11+
12+
pytestmark = pytest.mark.xfail(
13+
version.parse(pytest.__version__) >= version.parse("8"),
14+
reason=(
15+
"Lazy-fixture is incompatible with pytest 8 "
16+
"(see TvoroG/pytest-lazy-fixture#65)"
17+
),
18+
)
19+
1020

1121
@pytest.fixture
1222
def lazy_fixture_runner(allure_pytest_runner: AllurePytestRunner):

0 commit comments

Comments
 (0)