8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f56451b commit b69e803Copy full SHA for b69e803
Lib/test/test_generators.py
@@ -182,6 +182,7 @@ def gen():
182
yield 1
183
184
thresholds = gc.get_threshold()
185
+
186
gc.callbacks.append(cb)
187
gc.set_threshold(1, 0, 0)
188
try:
@@ -197,11 +198,14 @@ def __del__(self):
197
198
sneaky = Sneaky()
199
sneaky._s = Sneaky()
200
sneaky._s._s = sneaky
- del sneaky
201
202
203
204
- gen()
+ del sneaky
205
+ try:
206
+ gen()
207
+ except KeyboardInterrupt:
208
+ pass
209
finally:
210
gc.set_threshold(*thresholds)
211
0 commit comments