Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jobh committed Jan 30, 2024
1 parent 2bca570 commit e20341a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hypothesis-python/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def pytest_runtest_call(item):
random_states_after_tests[after] = item.nodeid

# Annotate usage of .example() with a hint about alternatives
if isinstance(outcome.exception, NonInteractiveExampleWarning):
if isinstance(getattr(outcome, "exception", None), NonInteractiveExampleWarning):
add_note(
outcome.exception,
"For hypothesis' own test suite, consider using one of the helper "
Expand Down
2 changes: 1 addition & 1 deletion hypothesis-python/tests/cover/test_sideeffect_warnings.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

@pytest.fixture
def _extend_initialization(monkeypatch):
assert getattr(_hypothesis_globals, IN_INITIALIZATION_ATTR) == 0
assert getattr(_hypothesis_globals, IN_INITIALIZATION_ATTR) <= 0
monkeypatch.setattr(_hypothesis_globals, IN_INITIALIZATION_ATTR, 1)
fs.notice_initialization_restarted(warn=False)
assert fs._first_postinit_what is None # validates state as given in comment above
Expand Down

0 comments on commit e20341a

Please sign in to comment.