Skip to content

Commit

Permalink
fix: handle auto mine not impl
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Oct 14, 2024
1 parent 88a017c commit 01e42ff
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/ape/pytest/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,14 @@ def is_stateful(self, name: str) -> Optional[bool]:
# Or we already calculated.
return self._stateful_fixtures_cache[name]

elif not self.provider.auto_mine:
# When automine is disabled, it's unknown.
try:
is_auto_mine = self.provider.auto_mine
except NotImplementedError:
# Assume it's on since it can't be turned off.
is_auto_mine = True

if not is_auto_mine:
# When auto-mine is disabled, it's unknown.
return None

elif not (info := self._fixture_name_to_info.get(name)):
Expand Down

0 comments on commit 01e42ff

Please sign in to comment.