Dulwich.io dulwich / a497d42
Avoid using assert. Jelmer Vernooń≥ 5 days ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
761761 new_files = set(os.listdir(copy_path))
762762
763763 # Check that we have the exact same files in both repositories
764 assert original_files == new_files
764 self.assertEqual(original_files, new_files)
765765
766766 for file in original_files:
767767 if file == ".git":
770770 original_file_path = os.path.join(self.repo_path, file)
771771 copy_file_path = os.path.join(copy_path, file)
772772
773 assert os.path.isfile(copy_file_path)
773 self.assertTrue(os.path.isfile(copy_file_path))
774774
775775 with open(original_file_path, "rb") as original_file:
776776 original_content = original_file.read()
778778 with open(copy_file_path, "rb") as copy_file:
779779 copy_content = copy_file.read()
780780
781 assert original_content == copy_content
781 self.assertEqual(original_content, copy_content)
782782
783783
784784 class CommitTreeTests(PorcelainTestCase):