Skip to content

Commit

Permalink
Remove unconditional test item attribute access (#268)
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertCraigie committed Jan 17, 2022
1 parent 39c6d0c commit c919fd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pytest_asyncio/plugin.py
Expand Up @@ -452,7 +452,7 @@ def pytest_runtest_setup(item: pytest.Item) -> None:
if "event_loop" in fixturenames:
fixturenames.remove("event_loop")
fixturenames.insert(0, "event_loop")
obj = item.obj # type: ignore[attr-defined]
obj = getattr(item, 'obj', None)
if (
item.get_closest_marker("asyncio") is not None
and not getattr(obj, "hypothesis", False)
Expand Down

0 comments on commit c919fd7

Please sign in to comment.