""" A class for exceptions generated by this test. """
pass
-def compare_holes(file1, file2):
+def _compare_holes(file1, file2):
""" Make sure that files 'file1' and 'file2' have holes at the same places.
The 'file1' and 'file2' arguments may be full file paths or file
objects. """
# Make sure that holes in the copy are identical to holes in the random
# sparse file.
- compare_holes(f_image.name, f_copy.name)
+ _compare_holes(f_image.name, f_copy.name)
#
# Pass 2: same as pass 1, but use file objects instead of paths
writer.copy(False, True)
assert _calculate_sha1(f_copy) == image_sha1
- compare_holes(f_image, f_copy)
+ _compare_holes(f_image, f_copy)
# Make sure the bmap files generated at pass 1 and pass 2 are identical
assert filecmp.cmp(f_bmap1.name, f_bmap2.name, False)
writer.copy(False, True)
writer.sync()
assert _calculate_sha1(f_copy) == image_sha1
- compare_holes(f_image, f_copy)
+ _compare_holes(f_image, f_copy)
assert filecmp.cmp(f_bmap1.name, f_bmap2.name, False)
#