patch pytest
@@ -33,8 +33,15 @@ class TestArchive(unittest.TestCase):
copyfile(root_path + item[0], root_path + item[1])
orig_size += int(fs.file_size(root_path + item[1]))
arc.add_file(root_path + item[1])
- arc.add_file(root_path + '/files/archive_test_file')
- arc.add_file(root_path + '/files/archive_test_image')
+
+ copyfile(root_path + '/files/archive_test_file', root_path + '/temp/archive_test_file')
+ orig_size += int(fs.file_size(root_path + '/temp/archive_test_file'))
+ arc.add_file(root_path + '/temp/archive_test_file')
+
+ copyfile(root_path + '/files/archive_test_image', root_path + '/temp/archive_test_image')
+ orig_size += int(fs.file_size(root_path + '/temp/archive_test_image'))
+ arc.add_file(root_path + '/temp/archive_test_image')
+
arc.make(arc_path)
size = fs.file_size(arc_path)
self.assertTrue(size and 1024 < int(size) < orig_size)
