File tree Expand file tree Collapse file tree 2 files changed +3
-16
lines changed
quantcrypt/internal/cli/commands Expand file tree Collapse file tree 2 files changed +3
-16
lines changed Original file line number Diff line number Diff line change 99# SPDX-License-Identifier: MIT
1010#
1111
12- import os
13- import sys
1412import platform
1513from typer import Typer
1614from quantcrypt .internal import constants as const
2826)
2927
3028
31- def run_compiler (variants : list [const .PQAVariant ]) -> None :
32- sys .stdout = open (os .devnull , 'w' )
33- Compiler ().run (variants )
34-
35-
3629@compile_app .callback ()
3730def command_compile (
3831 algorithms : ats .CompileAlgos = None ,
Original file line number Diff line number Diff line change 99# SPDX-License-Identifier: MIT
1010#
1111
12- import secrets
13- import tempfile
1412from pathlib import Path
1513from quantcrypt .internal import utils , constants as const
1614from quantcrypt .internal .compiler import Compiler
1715
1816
19- def test_compiler_run (monkeypatch ):
20- base_path = Path (tempfile .gettempdir ())
21- test_path = base_path / "pytest" / secrets .token_hex (10 )
22- test_path .mkdir (parents = True , exist_ok = True )
23-
17+ def test_compiler_run (monkeypatch , alt_tmp_path ):
2418 def _mocked_search_upwards (_path : Path | str ):
25- sub_path = test_path / _path
19+ sub_path = alt_tmp_path / _path
2620 sub_path .mkdir (parents = True , exist_ok = True )
2721 return sub_path
2822
2923 monkeypatch .setattr (utils , "search_upwards" , _mocked_search_upwards )
3024
31- bin_path = test_path / "bin"
25+ bin_path = alt_tmp_path / "bin"
3226 old_file = bin_path / "old_file"
3327 old_folder = bin_path / "old_folder"
3428 old_folder .mkdir (parents = True )
You can’t perform that action at this time.
0 commit comments