summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2014-10-31 07:03:03 -0400
committerNed Batchelder <ned@nedbatchelder.com>2014-10-31 07:03:03 -0400
commit0d392269aac4f59cd42f8c545788510914ce4f4d (patch)
tree8f5f8042dc851b3e1b602513d8ef3fe16fe58254 /tests
parent734c3c1dc11105179fcf0b5b3622f9138af13d54 (diff)
downloadpython-coveragepy-git-0d392269aac4f59cd42f8c545788510914ce4f4d.tar.gz
Travis still failing, don't know why: get more info when sizes differ
Diffstat (limited to 'tests')
-rw-r--r--tests/test_farm.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/test_farm.py b/tests/test_farm.py
index df8fa666..9805a67e 100644
--- a/tests/test_farm.py
+++ b/tests/test_farm.py
@@ -241,6 +241,7 @@ class FarmTestCase(object):
diff_files = self.fnmatch_list(dc.diff_files, file_pattern)
left_only = self.fnmatch_list(dc.left_only, file_pattern)
right_only = self.fnmatch_list(dc.right_only, file_pattern)
+ show_diff = True
if size_within:
# The files were already compared, use the diff_files list as a
@@ -261,7 +262,11 @@ class FarmTestCase(object):
"File sizes differ between %s and %s: %s" % (
dir1, dir2, ", ".join(wrong_size)
))
- else:
+
+ # We'll show the diff if the files differed enough in size.
+ show_diff = bool(wrong_size)
+
+ if show_diff:
# filecmp only compares in binary mode, but we want text mode. So
# look through the list of different files, and compare them
# ourselves.