Skip to content

Commit a3b4755

Browse files
committed
wip
1 parent 7756474 commit a3b4755

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/test_cli.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22
import gzip
33
import shutil
44

5+
from typer.testing import CliRunner
6+
from pyodide_lock.cli import main
7+
58
DATA_DIR = Path(__file__).parent / "data"
69

7-
from pyodide_lock.cli import add_wheels
10+
11+
runner = CliRunner()
812

913
def test_cli_modify_file(test_wheel_list, tmp_path):
1014
source_path = DATA_DIR / f"pyodide-lock-0.23.3.json.gz"
@@ -15,7 +19,8 @@ def test_cli_modify_file(test_wheel_list, tmp_path):
1519
with target_path.open("wb") as fh_out:
1620
shutil.copyfileobj(fh_in, fh_out)
1721

18-
add_wheels(wheels=test_wheel_list, input=target_path, output=new_lock_path)
22+
result = runner.invoke(main, ["--input="+str(target_path), "--output="+str(new_lock_path), str(test_wheel_list[0])])
23+
assert result.exit_code == 0
1924
assert target_path.read_text() != new_lock_path.read_text()
2025

2126

0 commit comments

Comments
 (0)