Skip to content

Commit 350aedc

Browse files
committed
get rid of glob.glob
1 parent 3041e75 commit 350aedc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mergin/test/test_client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2328,8 +2328,10 @@ def test_clean_diff_files(mc):
23282328
shutil.copy(mp.fpath("inserted_1_A.gpkg"), mp.fpath(f_updated))
23292329
mc.push_project(project_dir)
23302330

2331-
diff_files = glob.glob("*-diff-*", root_dir=os.path.split(mp.fpath_meta("inserted_1_A.gpkg"))[0])
2331+
directory = os.path.split(mp.fpath_meta("inserted_1_A.gpkg"))[0]
2332+
diff_files = [f for f in os.listdir(directory) if "-diff-" in f]
23322333

2334+
# Assert that no matching files are found
23332335
assert diff_files == []
23342336

23352337

0 commit comments

Comments
 (0)