| 163 | timeout=0.1) |
| 164 | |
| 165 | def test_timeout_exception(self): |
| 166 | try: |
| 167 | subprocess.run([sys.executable, '-c', 'import time;time.sleep(9)'], timeout = -1) |
| 168 | except subprocess.TimeoutExpired as e: |
| 169 | self.assertIn("-1 seconds", str(e)) |
| 170 | else: |
| 171 | self.fail("Expected TimeoutExpired exception not raised") |
| 172 | try: |
| 173 | subprocess.run([sys.executable, '-c', 'import time;time.sleep(9)'], timeout = 0) |
| 174 | except subprocess.TimeoutExpired as e: |
| 175 | self.assertIn("0 seconds", str(e)) |
| 176 | else: |
| 177 | self.fail("Expected TimeoutExpired exception not raised") |
| 178 | |
| 179 | def test_check_call_zero(self): |
| 180 | # check_call() function with zero return code |