Skip to content

Commit

Permalink
Add more windows path normalisation to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
abravalheri committed Oct 31, 2021
1 parent 63698fa commit 2150ed9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def test_valid_examples(example, set_debug, monkeypatch):

distibutions = list(path.glob("dist/*.whl"))
assert distibutions
distribution_files = set(list_zip(distibutions[0]))
distribution_files = {_norm(p) for p in list_zip(distibutions[0])}
files = {_norm(p.with_suffix(".py")) for p in coconut_files(path)}
files |= {_norm(p) for p in other_files(path)}
try:
Expand All @@ -104,6 +104,8 @@ def test_valid_examples(example, set_debug, monkeypatch):
print("~_" * 40)
print("Missing files:\n")
print("\n".join(sorted(files - distribution_files)))
print("\nDistribution files:\n")
print("\n".join(sorted(distribution_files)))
print("~_" * 40)
raise

Expand All @@ -121,7 +123,7 @@ def test_invalid_examples(example, set_debug, monkeypatch):
build_project(path, monkeypatch, set_debug)
# If the project manages to be build, no coconut file should be compiled
distibutions = list(path.glob("dist/*.whl"))
distribution_files = set(list_zip(distibutions[0]))
distribution_files = {_norm(p) for p in list_zip(distibutions[0])}
files = {_norm(p.with_suffix(".py")) for p in coconut_files(path)}
compiled_and_included = distribution_files & files
try:
Expand Down

0 comments on commit 2150ed9

Please sign in to comment.