Closed musicinmybrain closed 6 months ago
This is due to the following in parser.py
:
@dataclass
class Feature:
scenarios: OrderedDict[str, ScenarioTemplate]
[...]
@dataclass
class ScenarioTemplate:
feature: Feature
[...]
That is, a Feature
references all its ScenarioTemplate
s, and a ScenarioTemplate
references all its Feature
s.
Both are in a dataclass
field with the default compare=True
, so comparing scenarios (if scenario in scenarios:
in _show_missing_code_main
) results in infinite recursion.
Perhaps Feature
should be compared by identity rather than by its contents? If that's the case, the fix would be to use:
@dataclass(eq=False)
class Feature:
...
It looks like this was fixed in https://github.com/pytest-dev/pytest-bdd/pull/682.
It would be neat to get this in a release at some point to make it easier to test dependent projects with Python 3.13.
I just released pytest-bdd 7.2.0 with explicit support for python 3.13
Wonderful! Thank you.
Using the current
master
, 30ba3f7ba151768f227613eb2a186d4bc5c262aa: