Skip to content

Commit

Permalink
Expected fail of lazy-fixture tests (#793)
Browse files Browse the repository at this point in the history
  • Loading branch information
delatrie authored Feb 15, 2024
1 parent f5db4f4 commit fe74f46
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 9 deletions.
5 changes: 4 additions & 1 deletion allure-behave/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[tool.poe.tasks]
linter = "flake8 --extend-ignore=A003 ./src"
tests = """pytest ../tests/allure_behave"""

[tool.poe.tasks.tests]
cmd = "pytest ../tests/allure_behave"
env = { PYTEST_DISABLE_PLUGIN_AUTOLOAD = "true" }
5 changes: 4 additions & 1 deletion allure-nose2/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[tool.poe.tasks]
linter = "flake8 ./src"
tests = """pytest ../tests/allure_nose2"""

[tool.poe.tasks.tests]
cmd = "pytest ../tests/allure_nose2"
env = { PYTEST_DISABLE_PLUGIN_AUTOLOAD = "true" }
5 changes: 4 additions & 1 deletion allure-pytest-bdd/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[tool.poe.tasks]
linter = "flake8 ./src"
tests = "pytest ../tests/allure_pytest_bdd"

[tool.poe.tasks.tests]
cmd = "pytest ../tests/allure_pytest_bdd"
env = { PYTEST_DISABLE_PLUGIN_AUTOLOAD = "true" }
5 changes: 4 additions & 1 deletion allure-pytest/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[tool.poe.tasks]
linter = "flake8 ./src"
tests = "pytest ../tests/allure_pytest"

[tool.poe.tasks.tests]
cmd = "pytest ../tests/allure_pytest"
env = { PYTEST_DISABLE_PLUGIN_AUTOLOAD = "true" }
7 changes: 4 additions & 3 deletions allure-robotframework/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[tool.poe.tasks]
linter = "flake8 ./src"
tests = { shell = """python -m doctest ./src/listener/utils.py &&
pytest ../tests/allure_robotframework
""" }

[tool.poe.tasks.tests]
shell = "python -m doctest ./src/listener/utils.py && pytest ../tests/allure_robotframework"
env = { PYTEST_DISABLE_PLUGIN_AUTOLOAD = "true" }
10 changes: 8 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
[tool.poe.tasks]
linter = "flake8 ./allure-*/src ./tests"
tests = "pytest"
allure-collect = "pytest -p allure_pytest --alluredir ./.allure-results --clean-alluredir --allure-link-pattern issue:https://github.com/allure-framework/allure-python/issues/{0}"
allure-generate = "allure generate --clean --output ./.allure-report ./.allure-results"
allure-open = "allure open ./.allure-report"

[tool.poe.tasks.tests]
cmd = "pytest"
env = { PYTEST_DISABLE_PLUGIN_AUTOLOAD = "true" }

[tool.poe.tasks.allure-collect]
cmd = "pytest -p allure_pytest --alluredir ./.allure-results --clean-alluredir --allure-link-pattern issue:https://github.com/allure-framework/allure-python/issues/{0}"
env = { PYTEST_DISABLE_PLUGIN_AUTOLOAD = "true" }

[tool.pytest.ini_options]
testpaths = [
"tests"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@
from allure_commons_test.container import has_container
from allure_commons_test.container import has_before

from packaging import version

pytestmark = pytest.mark.xfail(
version.parse(pytest.__version__) >= version.parse("8"),
reason=(
"Lazy-fixture is incompatible with pytest 8 "
"(see TvoroG/pytest-lazy-fixture#65)"
),
)


@pytest.fixture
def lazy_fixture_runner(allure_pytest_runner: AllurePytestRunner):
Expand Down

0 comments on commit fe74f46

Please sign in to comment.