Skip to content

Commit 5c29144

Browse files
committed
Add test for timeout=0
1 parent 5c7ec2f commit 5c29144

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Lib/test/test_subprocess.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1417,6 +1417,8 @@ def test_wait(self):
14171417
def test_wait_timeout(self):
14181418
p = subprocess.Popen([sys.executable,
14191419
"-c", "import time; time.sleep(0.3)"])
1420+
with self.assertRaises(subprocess.TimeoutExpired) as c:
1421+
p.wait(timeout=0)
14201422
with self.assertRaises(subprocess.TimeoutExpired) as c:
14211423
p.wait(timeout=0.0001)
14221424
self.assertIn("0.0001", str(c.exception)) # For coverage of __str__.

0 commit comments

Comments
 (0)