File tree 2 files changed +18
-1
lines changed
2 files changed +18
-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
+ DATA_DIR = Path (__file__ ).parent / "data"
2
+
3
+ from pyodide_lock .cli import add_wheels
4
+
5
+ def test_cli_modify_file (test_wheel_list , tmp_path ):
6
+ source_path = DATA_DIR / f"pyodide-lock-0.23.3.json.gz"
7
+ target_path = tmp_path / "pyodide-lock.json"
8
+ new_lock_path = tmp_path / "pyodide-lock.json"
9
+
10
+ with gzip .open (source_path ) as fh_in :
11
+ with target_path .open ("wb" ) as fh_out :
12
+ shutil .copyfileobj (fh_in , fh_out )
13
+
14
+ add_wheels (test_wheel_list , input = target_path , output = new_lock_path )
15
+ assert target_path .read_text () != new_lock_path .read_text ()
16
+
17
+
You can’t perform that action at this time.
0 commit comments