Skip to content

Commit b8abc44

Browse files
committed
Fixed issue with windows testing
- different methods for reporting paths was resolved by casting them the pathlib.Paths
1 parent 556853b commit b8abc44

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_files.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
@pytest.mark.parametrize(
1616
["glob_pattern", "file_list"],
1717
[
18-
param("*.txt", {"file1.txt", "file2.txt"}, id="simple-glob"),
19-
param("**/*.txt", {"file1.txt", "file2.txt", "directory/file3.txt"}, id="recursive-glob"),
18+
param("*.txt", {Path("file1.txt"), Path("file2.txt")}, id="simple-glob"),
19+
param("**/*.txt", {Path("file1.txt"), Path("file2.txt"), Path("directory/file3.txt")}, id="recursive-glob"),
2020
],
2121
)
2222
def test_get_glob_files(glob_pattern: str, file_list: set, fixtures_path: Path):
@@ -37,7 +37,7 @@ def test_get_glob_files(glob_pattern: str, file_list: set, fixtures_path: Path):
3737

3838
assert len(result) == len(file_list)
3939
for f in result:
40-
assert f.path in file_list
40+
assert Path(f.path) in file_list
4141

4242

4343
def test_single_file_processed_twice(tmp_path: Path):

0 commit comments

Comments
 (0)