Skip to content

Commit

Permalink
fix: get better error message on windows failing CI
Browse files Browse the repository at this point in the history
  • Loading branch information
sabard committed Jan 10, 2022
1 parent 4c58e62 commit d74ec86
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions tests/test_dirty_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from copier.errors import DirtyLocalWarning
from copier.main import run_copy, run_update

from .helpers import DATA, PROJECT_TEMPLATE, build_file_tree, filecmp
from .helpers import DATA, PROJECT_TEMPLATE, build_file_tree


def test_copy(tmp_path_factory):
Expand Down Expand Up @@ -94,9 +94,9 @@ def test_update(tmp_path_factory):
# make sure changes have not yet propagated
assert not os.path.exists(dst / "test_file.txt")

p1 = str(src / "aaaa.txt")
p2 = str(dst / "aaaa.txt")
assert not filecmp.cmp(p1, p2)
p1 = src / "aaaa.txt"
p2 = dst / "aaaa.txt"
assert p1.read_text() != p2.read_text()

assert os.path.exists(dst / "to_delete.txt")

Expand All @@ -106,10 +106,9 @@ def test_update(tmp_path_factory):
# make sure changes propagate after update
assert os.path.exists(dst / "test_file.txt")

p1 = str(src / "aaaa.txt")
p2 = str(dst / "aaaa.txt")
filecmp.clear_cache()
assert filecmp.cmp(p1, p2)
p1 = src / "aaaa.txt"
p2 = dst / "aaaa.txt"
assert p1.read_text() == p2.read_text()

# HACK https://github.com/copier-org/copier/issues/461
# TODO test file deletion on update
Expand Down

0 comments on commit d74ec86

Please sign in to comment.