File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ def test_mock_run_quantize(m_check_output: mock.Mock):
33
33
sys .platform != "darwin" and platform .machine () != "arm64" ,
34
34
reason = "binary is Apple M1-only" ,
35
35
)
36
- def test_run_quantize ():
36
+ def test_run_quantize (tmp_path : pathlib . Path ):
37
37
with pytest .raises (subprocess .CalledProcessError ) as exc_info :
38
38
instructlab_quantize .run_quantize ("--help" , stderr = subprocess .STDOUT , text = True )
39
39
@@ -43,7 +43,10 @@ def test_run_quantize():
43
43
assert exc .returncode == 1
44
44
45
45
quant_type = "Q4_K_M"
46
+ outfile = tmp_path / "ggml-vocab-{quant_type}.gguf"
46
47
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 ,
48
51
)
49
- assert os . path . isfile ( f"llama.cpp/models/ggml-model- { quant_type } .gguf" )
52
+ assert outfile . is_file ( )
You can’t perform that action at this time.
0 commit comments