fixtures: some type annotations, remove cyclic dependency#7844
fixtures: some type annotations, remove cyclic dependency#7844bluetech merged 2 commits intopytest-dev:masterfrom
Conversation
RonnyPfannschmidt
left a comment
There was a problem hiding this comment.
Looks lovely overall, thanks
| ) | ||
|
|
||
| def applymarker(self, marker) -> None: | ||
| def applymarker(self, marker: Union[str, MarkDecorator]) -> None: |
There was a problem hiding this comment.
Should be plain marks as well
There was a problem hiding this comment.
Thanks for the review.
It seems that plain mark is not accepted here -- this function calls self.node.add_marker(marker) which starts with
from _pytest.mark import MARK_GEN
if isinstance(marker, MarkDecorator):
marker_ = marker
elif isinstance(marker, str):
marker_ = getattr(MARK_GEN, marker)
else:
raise ValueError("is not a string or pytest.mark.* Marker"- Change the fixtures plugin to store its one piece of data on the node's Store instead of directly. - Import FixtureLookupError lazily.
3cc9976 to
d0a3f1d
Compare
|
I always considered using dicts better than a chain of |
|
Good question, the reasons I changed it are:
|
|
I think that the |
|
Great work! |
Please see the two commits.