8000 GH-94262: Don't create frame objects for frames that aren't complete. by markshannon · Pull Request #94371 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-94262: Don't create frame objects for frames that aren't complete. #94371

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jul 1, 2022
Prev Previous commit
Next Next commit
Cleanup after test.
  • Loading branch information
markshannon committed Jun 28, 2022
commit e81c1f35f32b8fe0c0a1a3b254241c5bb9d71371
13 changes: 9 additions & 4 deletions Lib/test/test_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,18 @@ def cb(*args):
except ValueError:
pass

gc.set_threshold(1, 0, 0)
gc.callbacks.append(cb)

def gen():
yield 1

gen()
thresholds = gc.get_threshold()
gc.callbacks.append(cb)
gc.set_threshold(1, 0, 0)

try:
gen()
finally:
gc.set_threshold(*thresholds)
gc.callbacks.pop()

class ExceptionTest(unittest.TestCase):
# Tests for the issue #23353: check that the currently handled exception
Expand Down
0