diff --git a/allure-behave/pyproject.toml b/allure-behave/pyproject.toml index 83bfa75b..388f9913 100644 --- a/allure-behave/pyproject.toml +++ b/allure-behave/pyproject.toml @@ -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" } diff --git a/allure-nose2/pyproject.toml b/allure-nose2/pyproject.toml index fc8c91d9..822f5d98 100644 --- a/allure-nose2/pyproject.toml +++ b/allure-nose2/pyproject.toml @@ -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" } diff --git a/allure-pytest-bdd/pyproject.toml b/allure-pytest-bdd/pyproject.toml index ef264568..83277cf5 100644 --- a/allure-pytest-bdd/pyproject.toml +++ b/allure-pytest-bdd/pyproject.toml @@ -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" } diff --git a/allure-pytest/pyproject.toml b/allure-pytest/pyproject.toml index a65620d3..22458017 100644 --- a/allure-pytest/pyproject.toml +++ b/allure-pytest/pyproject.toml @@ -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" } diff --git a/allure-robotframework/pyproject.toml b/allure-robotframework/pyproject.toml index d869331e..0ee96703 100644 --- a/allure-robotframework/pyproject.toml +++ b/allure-robotframework/pyproject.toml @@ -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" } diff --git a/pyproject.toml b/pyproject.toml index 5485c029..f52572e9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" diff --git a/tests/allure_pytest/externals/pytest_lazy_fixture/pytest_lazy_fixture_test.py b/tests/allure_pytest/externals/pytest_lazy_fixture/pytest_lazy_fixture_test.py index cdb3bb08..1b314337 100644 --- a/tests/allure_pytest/externals/pytest_lazy_fixture/pytest_lazy_fixture_test.py +++ b/tests/allure_pytest/externals/pytest_lazy_fixture/pytest_lazy_fixture_test.py @@ -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):