diff options
Diffstat (limited to 'test/test_farm.py')
-rw-r--r-- | test/test_farm.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/test_farm.py b/test/test_farm.py index 26da193..9ca494f 100644 --- a/test/test_farm.py +++ b/test/test_farm.py @@ -213,11 +213,13 @@ class FarmTestCase(object): # guide for size comparison. wrong_size = [] for f in diff_files: - size_l = len(open(os.path.join(dir1, f), "rb").read()) - size_r = len(open(os.path.join(dir2, f), "rb").read()) - big = max(size_l, size_r) - little = min(size_l, size_r) + left = open(os.path.join(dir1, f), "rb").read() + right = open(os.path.join(dir2, f), "rb").read() + size_l, size_r = len(left), len(right) + big, little = max(size_l, size_r), min(size_l, size_r) if (big - little) / float(little) > size_within/100.0: + # print "%d %d" % (big, little) + # print "Left: ---\n%s\n-----\n%s" % (left, right) wrong_size.append(f) assert not wrong_size, "File sizes differ: %s" % wrong_size else: |