diff options
| author | JARVIX <273200855+jarvixaiassistant-glitch@users.noreply.github.com> | 2026-11-30 14:04:40 +0000 |
|---|---|---|
| committer | JARVIX <273200855+jarvixaiassistant-glitch@users.noreply.github.com> | 2026-11-30 14:04:40 +0000 |
| commit | aa0687837f078ca7b904b204a34a1d5eab7b0fd8 (patch) | |
| tree | 6bfde43bbf847b3f8f3cdaa97f2608d16a1fcfca /tests/test_run_gpu_tests_python_assembler.py | |
| parent | b7f1371c0524a1c4a4eb1758e2ddf1b8662e82d4 (diff) | |
| parent | f44904d21cb64c7c2121905f49ff50f6cd2b132d (diff) | |
Merge remote-tracking branch 'upstream/main' into fix/decode-ds-llvm-parity
Diffstat (limited to 'tests/test_run_gpu_tests_python_assembler.py')
| -rw-r--r-- | tests/test_run_gpu_tests_python_assembler.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_run_gpu_tests_python_assembler.py b/tests/test_run_gpu_tests_python_assembler.py index d817f4ec0..fd61b6a9d 100644 --- a/tests/test_run_gpu_tests_python_assembler.py +++ b/tests/test_run_gpu_tests_python_assembler.py | |||
| @@ -20,6 +20,14 @@ import run_gpu_tests | |||
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | class PythonAssemblerTests(unittest.TestCase): | 22 | class PythonAssemblerTests(unittest.TestCase): |
| 23 | def test_native_assembler_error_preserves_undecodable_diagnostics(self): | ||
| 24 | run = subprocess.run | ||
| 25 | child = [sys.executable, "-c", "import sys; sys.stderr.buffer.write(b'bad operand \\xff'); sys.exit(1)"] | ||
| 26 | with patch.object(run_gpu_tests.subprocess, "run", side_effect=lambda _, **kw: run(child, **kw)): | ||
| 27 | with self.assertRaises(RuntimeError) as raised: | ||
| 28 | run_gpu_tests.spirv_as("", "unused.spv") | ||
| 29 | self.assertIn(r"bad operand \xff", str(raised.exception)) | ||
| 30 | |||
| 23 | def test_resolve_assembler_auto_and_explicit(self) -> None: | 31 | def test_resolve_assembler_auto_and_explicit(self) -> None: |
| 24 | self.assertEqual(run_gpu_tests.resolve_assembler("python"), "python") | 32 | self.assertEqual(run_gpu_tests.resolve_assembler("python"), "python") |
| 25 | self.assertEqual(run_gpu_tests.resolve_assembler("spirv-as"), "spirv-as") | 33 | self.assertEqual(run_gpu_tests.resolve_assembler("spirv-as"), "spirv-as") |