Pewarta Proxy

📋 Server Request & Proxy Logs

Loading active proxy settings...
Developed by Khairul Adha (adhexa.id)
Mengambil log server...

⚙️ Pengaturan Proxy Target

Skip to content
Next Next commit
Add test for creating frame object when making a generator.
  • Loading branch information
markshannon committed Jun 27, 2022
commit 87e97ae4ad8942bc0cc09174d8964c3e02b6b03b
15 changes: 15 additions & 0 deletions Lib/test/test_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,21 @@ def f():
g.send(0)
self.assertEqual(next(g), 1)

def test_handle_frame_object_in_creation(self):
Comment thread
markshannon marked this conversation as resolved.
Resolved

def cb(*args):
try:
sys._getframe(1)
except ValueError:
pass

gc.set_threshold(1, 0, 0)
Comment thread
markshannon marked this conversation as resolved.
Resolved
gc.callbacks.append(cb)

def gen():
yield 1

gen()

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