|
5 | 5 |
|
6 | 6 |
|
7 | 7 | class TestCliEngineGet: |
| 8 | + |
| 9 | + @pytest.mark.skipif(platform.system() != "Windows", reason="Windows-specific test") |
| 10 | + def test_engines_get_tensorrt_llm_should_not_be_incompatible(self): |
| 11 | + exit_code, output, error = run( |
| 12 | + "Get engine", ["engines", "get", "cortex.tensorrt-llm"] |
| 13 | + ) |
| 14 | + assert exit_code == 0, f"Get engine failed with error: {error}" |
| 15 | + assert ( |
| 16 | + "Incompatible" not in output |
| 17 | + ), "cortex.tensorrt-llm should be Ready or Not Installed on Windows" |
| 18 | + |
8 | 19 | @pytest.mark.skipif(platform.system() != "Windows", reason="Windows-specific test") |
9 | | - def test_engines_list_run_successfully_on_windows(self): |
10 | | - # TODO: implement |
11 | | - assert 0 == 0 |
| 20 | + def test_engines_get_onnx_should_not_be_incompatible(self): |
| 21 | + exit_code, output, error = run("Get engine", ["engines", "get", "cortex.onnx"]) |
| 22 | + assert exit_code == 0, f"Get engine failed with error: {error}" |
| 23 | + assert ( |
| 24 | + "Incompatible" not in output |
| 25 | + ), "cortex.onnx should be Ready or Not Installed on Windows" |
| 26 | + |
| 27 | + def test_engines_get_llamacpp_should_not_be_incompatible(self): |
| 28 | + exit_code, output, error = run( |
| 29 | + "Get engine", ["engines", "get", "cortex.llamacpp"] |
| 30 | + ) |
| 31 | + assert exit_code == 0, f"Get engine failed with error: {error}" |
| 32 | + assert ( |
| 33 | + "Incompatible" not in output |
| 34 | + ), "cortex.llamacpp should be compatible for Windows, MacOs and Linux" |
12 | 35 |
|
13 | 36 | @pytest.mark.skipif(platform.system() != "Darwin", reason="macOS-specific test") |
14 | | - def test_engines_get_run_successfully_on_macos(self): |
15 | | - exit_code, output, error = run("Get engine", ["engines", "get", "cortex.llamacpp"]) |
| 37 | + def test_engines_get_tensorrt_llm_should_be_incompatible_on_macos(self): |
| 38 | + exit_code, output, error = run( |
| 39 | + "Get engine", ["engines", "get", "cortex.tensorrt-llm"] |
| 40 | + ) |
16 | 41 | assert exit_code == 0, f"Get engine failed with error: {error}" |
| 42 | + assert ( |
| 43 | + "Incompatible" in output |
| 44 | + ), "cortex.tensorrt-llm should be Incompatible on MacOS" |
17 | 45 |
|
18 | 46 | @pytest.mark.skipif(platform.system() != "Darwin", reason="macOS-specific test") |
19 | | - def test_engines_get_llamacpp_on_macos(self): |
20 | | - exit_code, output, error = run("Get engine", ["engines", "get", "cortex.llamacpp"]) |
| 47 | + def test_engines_get_onnx_should_be_incompatible_on_macos(self): |
| 48 | + exit_code, output, error = run("Get engine", ["engines", "get", "cortex.onnx"]) |
21 | 49 | assert exit_code == 0, f"Get engine failed with error: {error}" |
22 | | - assert "Incompatible" not in output, f"cortex.llamacpp can only be Ready or Not Installed" |
| 50 | + assert "Incompatible" in output, "cortex.onnx should be Incompatible on MacOS" |
23 | 51 |
|
24 | 52 | @pytest.mark.skipif(platform.system() != "Linux", reason="Linux-specific test") |
25 | | - def test_engines_list_run_successfully_on_linux(self): |
26 | | - # TODO: implement |
27 | | - assert 0 == 0 |
| 53 | + def test_engines_get_onnx_should_be_incompatible_on_linux(self): |
| 54 | + exit_code, output, error = run("Get engine", ["engines", "get", "cortex.onnx"]) |
| 55 | + assert exit_code == 0, f"Get engine failed with error: {error}" |
| 56 | + assert "Incompatible" in output, "cortex.onnx should be Incompatible on Linux" |
0 commit comments