Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions tests/test_gpu_test_timeout.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,13 @@ def fake_run(cmd: list[str], **kwargs: object) -> subprocess.CompletedProcess[st
self.assertIn("0/1 passed", out.getvalue())

def test_quick_program_is_unaffected(self):
self.assertEqual(run_gpu_tests.run_cmd(QUICK), (0, "ok"))
rc, out = check.run(*QUICK)
self.assertEqual((rc, out.strip()), (0, "ok"))
# A limit is still in force, but not the hang cases' 0.5 s: starting a Python child alone can take longer than
# that on a loaded Windows host, which killed the quick program and failed this test for the wrong reason.
with patch.dict(os.environ, {"LEONIDA_GPU_TEST_TIMEOUT": "60"}):
self.assertEqual(check.gpu_test_timeout(), 60)
self.assertEqual(run_gpu_tests.run_cmd(QUICK), (0, "ok"))
rc, out = check.run(*QUICK)
self.assertEqual((rc, out.strip()), (0, "ok"))

def test_translator_step_has_no_limit(self):
seen = {}
Expand Down