Skip to content

Commit a9f6951

Browse files
committed
Try startswith
1 parent 5ea14b2 commit a9f6951

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/test_package_generation.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ def test_package_generation(
8080

8181
actual_files = get_all_files_folders(test_project_dir)
8282
# Filter out anything under specific directories to make comparison easier
83-
actual_files = actual_files - {
84-
a
85-
for a in actual_files
86-
if len(a.parts) > 0 and a.parts[0] in (".git", "__pycache__")
83+
actual_files = {
84+
path
85+
for path in actual_files
86+
if not str(path).startswith((".git/", "__pycache__/"))
8787
}
8888

8989
assert actual_files == expected_files

0 commit comments

Comments
 (0)