File tree 2 files changed +22
-1
lines changed
2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ def add_wheels(
47
47
48
48
"""
49
49
sp = PyodideLockSpec .from_json (input )
50
- add_wheels_to_spec (
50
+ sp = add_wheels_to_spec (
51
51
sp ,
52
52
wheels ,
53
53
base_path = base_path ,
Original file line number Diff line number Diff line change
1
+ from pathlib import Path
2
+ import gzip
3
+ import shutil
4
+
5
+ DATA_DIR = Path (__file__ ).parent / "data"
6
+
7
+ from pyodide_lock .cli import add_wheels
8
+
9
+ def test_cli_modify_file (test_wheel_list , tmp_path ):
10
+ source_path = DATA_DIR / f"pyodide-lock-0.23.3.json.gz"
11
+ target_path = tmp_path / "pyodide-lock.json"
12
+ new_lock_path = tmp_path / "pyodide-lock.json"
13
+
14
+ with gzip .open (source_path ) as fh_in :
15
+ with target_path .open ("wb" ) as fh_out :
16
+ shutil .copyfileobj (fh_in , fh_out )
17
+
18
+ add_wheels (wheels = test_wheel_list , input = target_path , output = new_lock_path )
19
+ assert target_path .read_text () != new_lock_path .read_text ()
20
+
21
+
You can’t perform that action at this time.
0 commit comments