@@ -130,6 +130,9 @@ class TestImportFiles:
130130
131131 def test_import_files_basic (self , tmp_path ):
132132 db = tmp_path / "test.db"
133+ subprocess .run (
134+ [sys .executable , "-m" , "farchive._cli" , "init" , str (db )], check = True
135+ )
133136 root = tmp_path / "files"
134137 root .mkdir ()
135138 (root / "a.txt" ).write_bytes (b"content a" )
@@ -152,6 +155,9 @@ def test_import_files_basic(self, tmp_path):
152155
153156 def test_import_files_dry_run (self , tmp_path ):
154157 db = tmp_path / "test.db"
158+ subprocess .run (
159+ [sys .executable , "-m" , "farchive._cli" , "init" , str (db )], check = True
160+ )
155161 root = tmp_path / "files"
156162 root .mkdir ()
157163 (root / "a.txt" ).write_bytes (b"content" )
@@ -172,6 +178,9 @@ def test_import_files_dry_run(self, tmp_path):
172178
173179 def test_import_files_recursive (self , tmp_path ):
174180 db = tmp_path / "test.db"
181+ subprocess .run (
182+ [sys .executable , "-m" , "farchive._cli" , "init" , str (db )], check = True
183+ )
175184 root = tmp_path / "files"
176185 root .mkdir ()
177186 (root / "sub" ).mkdir ()
@@ -194,6 +203,9 @@ def test_import_files_recursive(self, tmp_path):
194203
195204 def test_import_files_storage_class_by_ext (self , tmp_path ):
196205 db = tmp_path / "test.db"
206+ subprocess .run (
207+ [sys .executable , "-m" , "farchive._cli" , "init" , str (db )], check = True
208+ )
197209 root = tmp_path / "files"
198210 root .mkdir ()
199211 (root / "page.html" ).write_bytes (b"<html></html>" )
@@ -230,6 +242,9 @@ class TestImportManifest:
230242
231243 def test_import_manifest_jsonl (self , tmp_path ):
232244 db = tmp_path / "test.db"
245+ subprocess .run (
246+ [sys .executable , "-m" , "farchive._cli" , "init" , str (db )], check = True
247+ )
233248 root = tmp_path / "files"
234249 root .mkdir ()
235250 (root / "a.txt" ).write_bytes (b"content a" )
@@ -252,6 +267,9 @@ def test_import_manifest_jsonl(self, tmp_path):
252267
253268 def test_import_manifest_dry_run (self , tmp_path ):
254269 db = tmp_path / "test.db"
270+ subprocess .run (
271+ [sys .executable , "-m" , "farchive._cli" , "init" , str (db )], check = True
272+ )
255273 root = tmp_path / "files"
256274 root .mkdir ()
257275 (root / "a.txt" ).write_bytes (b"content" )
0 commit comments