File tree 1 file changed +6
-3
lines changed
hypothesis-python/tests/cover 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -196,19 +196,22 @@ def test_drawfn_cannot_be_instantiated():
196
196
197
197
198
198
@pytest .mark .skipif (sys .version_info [:2 ] == (3 , 9 ), reason = "stack depth varies???" )
199
- @pytest .mark .skipif (sys .version_info [:2 ] <= (3 , 11 ), reason = "TEMP: see PR #3961" )
200
199
def test_warns_on_strategy_annotation ():
201
200
# TODO: print the stack on Python 3.10 and 3.11 to determine the appropriate
202
201
# stack depth to use. Consider adding a debug-print if IN_COVERAGE_TESTS
203
202
# and the relevant depth is_hypothesis_file(), for easier future fixing.
203
+ #
204
+ # Meanwhile, the test is not skipped on 3.10/3.11 as it is still required for
205
+ # coverage of the warning-generating branch.
204
206
with pytest .warns (HypothesisWarning , match = "Return-type annotation" ) as w :
205
207
206
208
@st .composite
207
209
def my_integers (draw : st .DrawFn ) -> st .SearchStrategy [int ]:
208
210
return draw (st .integers ())
209
211
210
- assert len (w .list ) == 1
211
- assert w .list [0 ].filename == __file__ # check stacklevel points to user code
212
+ if sys .version_info [:2 ] > (3 , 11 ): # TEMP: see PR #3961
213
+ assert len (w .list ) == 1
214
+ assert w .list [0 ].filename == __file__ # check stacklevel points to user code
212
215
213
216
214
217
def test_composite_allows_overload_without_draw ():
You can’t perform that action at this time.
0 commit comments