Skip to content

Commit f98320f

Browse files
committed
Formatting
1 parent e27b859 commit f98320f

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

hypothesis-python/src/hypothesis/internal/conjecture/junkdrawer.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import sys
1818
import time
1919
import warnings
20-
from math import nan as NaN
2120
from random import Random
2221
from typing import (
2322
Callable,

hypothesis-python/tests/cover/test_deadline.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,12 @@
99
# obtain one at https://mozilla.org/MPL/2.0/.
1010

1111
import gc
12-
import math
13-
import sys
1412
import time
1513

1614
import pytest
1715

1816
from hypothesis import given, settings, strategies as st
1917
from hypothesis.errors import DeadlineExceeded, Flaky, InvalidArgument
20-
from hypothesis.internal.conjecture import junkdrawer
21-
from hypothesis.internal.observability import TESTCASE_CALLBACKS
2218

2319
from tests.common.utils import assert_falsifying_output, fails_with
2420

@@ -161,7 +157,9 @@ def delay(phase, _info):
161157
gc.callbacks.remove(delay)
162158

163159

164-
@pytest.mark.skipif(not hasattr(gc, "callbacks"), reason="PyPy has weird stack-limit behaviour")
160+
@pytest.mark.skipif(
161+
not hasattr(gc, "callbacks"), reason="PyPy has weird stack-limit behaviour"
162+
)
165163
def test_gc_hooks_do_not_cause_unraisable_recursionerror():
166164
# We were concerned in #3979 that we might see bad results from a RecursionError
167165
# inside the GC hook, if the stack was already deep and someone (e.g. Pytest)
@@ -217,8 +215,9 @@ def inner_test(_):
217215
break
218216

219217
# Verify limits w/o any gc interfering
220-
gen_cycles_at_depth(max_depth - 1, gc_disable=True) # this line raises RecursionError on Pypy
221-
gen_cycles_at_depth(max_depth, gc_disable=True) # while this line doesn't
218+
gen_cycles_at_depth(max_depth - 1, gc_disable=True)
219+
# the previous line raises RecursionError on Pypy, while the next doesn't (!)
220+
gen_cycles_at_depth(max_depth, gc_disable=True)
222221
with pytest.raises(RecursionError):
223222
gen_cycles_at_depth(max_depth + 1, gc_disable=True)
224223

0 commit comments

Comments
 (0)