Skip to content

Commit 2e2e467

Browse files
committed
fix: use assert not in instead
Signed-off-by: yihong0618 <[email protected]>
1 parent b9af102 commit 2e2e467

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Lib/test/test_atexit.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ def test_atexit_with_low_memory(self):
201201
import _testcapi
202202
203203
def callback():
204+
print("hello")
204205
pass
205206
206207
atexit.register(callback)
@@ -211,9 +212,10 @@ def callback():
211212
with script_helper.spawn_python('-c', user_input,
212213
stderr=subprocess.PIPE) as p:
213214
p.wait()
214-
p.stdout.read()
215+
output = p.stdout.read()
215216

216217
self.assertIn(p.returncode, (0, 1))
218+
self.assertNotIn(b"hello", output)
217219

218220

219221
if __name__ == "__main__":

0 commit comments

Comments
 (0)