Skip to content

Commit e20341a

Browse files
committed
Fix tests
1 parent 2bca570 commit e20341a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

hypothesis-python/tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def pytest_runtest_call(item):
133133
random_states_after_tests[after] = item.nodeid
134134

135135
# Annotate usage of .example() with a hint about alternatives
136-
if isinstance(outcome.exception, NonInteractiveExampleWarning):
136+
if isinstance(getattr(outcome, "exception", None), NonInteractiveExampleWarning):
137137
add_note(
138138
outcome.exception,
139139
"For hypothesis' own test suite, consider using one of the helper "

hypothesis-python/tests/cover/test_sideeffect_warnings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
@pytest.fixture
2929
def _extend_initialization(monkeypatch):
30-
assert getattr(_hypothesis_globals, IN_INITIALIZATION_ATTR) == 0
30+
assert getattr(_hypothesis_globals, IN_INITIALIZATION_ATTR) <= 0
3131
monkeypatch.setattr(_hypothesis_globals, IN_INITIALIZATION_ATTR, 1)
3232
fs.notice_initialization_restarted(warn=False)
3333
assert fs._first_postinit_what is None # validates state as given in comment above

0 commit comments

Comments
 (0)