Skip to content

Commit

Permalink
Fixed issue with windows testing
Browse files Browse the repository at this point in the history
- different methods for reporting paths was resolved by casting them the pathlib.Paths
  • Loading branch information
coordt committed Apr 12, 2023
1 parent 556853b commit b8abc44
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
@pytest.mark.parametrize(
["glob_pattern", "file_list"],
[
param("*.txt", {"file1.txt", "file2.txt"}, id="simple-glob"),
param("**/*.txt", {"file1.txt", "file2.txt", "directory/file3.txt"}, id="recursive-glob"),
param("*.txt", {Path("file1.txt"), Path("file2.txt")}, id="simple-glob"),
param("**/*.txt", {Path("file1.txt"), Path("file2.txt"), Path("directory/file3.txt")}, id="recursive-glob"),
],
)
def test_get_glob_files(glob_pattern: str, file_list: set, fixtures_path: Path):
Expand All @@ -37,7 +37,7 @@ def test_get_glob_files(glob_pattern: str, file_list: set, fixtures_path: Path):

assert len(result) == len(file_list)
for f in result:
assert f.path in file_list
assert Path(f.path) in file_list


def test_single_file_processed_twice(tmp_path: Path):
Expand Down

0 comments on commit b8abc44

Please sign in to comment.