Skip to content

Refactored scope handling in pytest 7 #241

@The-Compiler

Description

@The-Compiler

Thanks to pytest-dev/pytest#9415, we found out that pytest-cases breaks with pytest 7.0.0rc1:

  File "/home/florian/tmp/pytest-bisect/python-pytest-cases/src/pytest_cases/__init__.py", line 8, in <module>
    from .fixture_core1_unions import fixture_union, NOT_USED, unpack_fixture, ignore_unused
  File "/home/florian/tmp/pytest-bisect/python-pytest-cases/src/pytest_cases/fixture_core1_unions.py", line 26, in <module>
    from .common_pytest import get_fixture_name, is_marked_parameter_value, get_marked_parameter_values, pytest_fixture, \
  File "/home/florian/tmp/pytest-bisect/python-pytest-cases/src/pytest_cases/common_pytest.py", line 527, in <module>
    from _pytest.python import scopes as pt_scopes, Metafunc  # noqa
ImportError: cannot import name 'scopes' from '_pytest.python' (/home/florian/proj/pytest/src/_pytest/python.py)

this is due to this change: pytest-dev/pytest#8913 - looks like scopes are now an enum in a new scope.py.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions