Skip to content

Commit c27cdd6

Browse files
committed
test with outfile parameter
Signed-off-by: Christian Heimes <[email protected]>
1 parent b57c38b commit c27cdd6

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def test_mock_run_quantize(m_check_output: mock.Mock):
3333
sys.platform != "darwin" and platform.machine() != "arm64",
3434
reason="binary is Apple M1-only",
3535
)
36-
def test_run_quantize():
36+
def test_run_quantize(tmp_path: pathlib.Path):
3737
with pytest.raises(subprocess.CalledProcessError) as exc_info:
3838
instructlab_quantize.run_quantize("--help", stderr=subprocess.STDOUT, text=True)
3939

@@ -43,7 +43,10 @@ def test_run_quantize():
4343
assert exc.returncode == 1
4444

4545
quant_type = "Q4_K_M"
46+
outfile = tmp_path / "ggml-vocab-{quant_type}.gguf"
4647
instructlab_quantize.run_quantize(
47-
"llama.cpp/models/ggml-vocab-llama.gguf", quant_type
48+
"llama.cpp/models/ggml-vocab-llama.gguf",
49+
os.fspath(outfile),
50+
quant_type,
4851
)
49-
assert os.path.isfile(f"llama.cpp/models/ggml-model-{quant_type}.gguf")
52+
assert outfile.is_file()

0 commit comments

Comments
 (0)