Skip to content

Commit 33c9b60

Browse files
committed
support utils under nose
1 parent bafde08 commit 33c9b60

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

hypothesis-python/tests/conjecture/common.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
from random import Random
1515
from typing import Optional
1616

17-
import pytest
18-
1917
from hypothesis import HealthCheck, Phase, assume, settings, strategies as st
2018
from hypothesis.control import current_build_context, currently_in_test_context
2119
from hypothesis.internal.conjecture import engine as engine_module
@@ -104,6 +102,9 @@ def accept(f):
104102

105103

106104
def fresh_data(*, random=None, observer=None) -> ConjectureData:
105+
# support importing this file from our nose job, which doesn't have pytest
106+
import pytest
107+
107108
context = current_build_context() if currently_in_test_context() else None
108109
if context is not None and settings().backend == "crosshair":
109110
# we should reeaxmine fresh_data sometime and see if we can replace it

0 commit comments

Comments
 (0)