Пример #1
0
 def test_cmp_dirs_identical_dirs(self):
     """cmp_dirs works for identical directories
     """
     # Compare dirs
     count = cmp_dirs(self.dref.dirn,self.dcpy.dirn)
     self.assertEqual(count[Md5Checker.MD5_OK],7)
     self.assertEqual(count[Md5Checker.LINKS_SAME],6)
Пример #2
0
 def test_cmp_dirs_different_dirs(self):
     """cmp_dirs works for different directories
     """
     # Add more files and links to reference
     self.dref.add_file("extra","Additional file")
     self.dref.add_link("destination","place/you/want/to/go")
     # Add differing files and links
     self.dref.add_file("more","Yet another file")
     self.dcpy.add_file("more","Yet another file, again")
     self.dref.add_link("where_to","somewhere")
     self.dcpy.add_link("where_to","somewhere/else")
     # Compare dirs
     count = cmp_dirs(self.dref.dirn,self.dcpy.dirn)
     self.assertEqual(count[Md5Checker.MD5_OK],7)
     self.assertEqual(count[Md5Checker.LINKS_SAME],6)
     self.assertEqual(count[Md5Checker.MD5_FAILED],1)
     self.assertEqual(count[Md5Checker.LINKS_DIFFER],1)