Skip to content
Prev Previous commit
Next Next commit
fix: use assert not in instead
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
  • Loading branch information
yihong0618 committed Oct 14, 2025
commit 2e2e467ed240916b128c931fe49fbdf6e0fc44d8
4 changes: 3 additions & 1 deletion Lib/test/test_atexit.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ def test_atexit_with_low_memory(self):
import _testcapi

def callback():
print("hello")
pass
Comment thread
yihong0618 marked this conversation as resolved.
Outdated

atexit.register(callback)
Expand All @@ -211,9 +212,10 @@ def callback():
with script_helper.spawn_python('-c', user_input,
stderr=subprocess.PIPE) as p:
p.wait()
p.stdout.read()
output = p.stdout.read()
Comment thread
yihong0618 marked this conversation as resolved.
Outdated

self.assertIn(p.returncode, (0, 1))
self.assertNotIn(b"hello", output)


if __name__ == "__main__":
Expand Down
Loading