]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-110395: test: assert after the child dies. (#111816)
authorGregory P. Smith <greg@krypto.org>
Tue, 7 Nov 2023 06:05:56 +0000 (22:05 -0800)
committerGitHub <noreply@github.com>
Tue, 7 Nov 2023 06:05:56 +0000 (06:05 +0000)
based on review from Victor Stinner.  I already made this edit in the 3.12 backport PR.

Lib/test/test_kqueue.py

index 28e882b1051e4cc56408ce2a62896ce74ac27e6b..e94edcbc107ba926b95be8dffdada07dbbc1c646 100644 (file)
@@ -271,8 +271,8 @@ class TestKQueue(unittest.TestCase):
             finally:
                 os._exit(0)
         else:
-            self.assertFalse(kqueue.closed)
             support.wait_process(pid, exitcode=0)
+            self.assertFalse(kqueue.closed)  # child done, we're still open.
 
 
 if __name__ == "__main__":