Ejemplo n.º 1
0
 def test_cmp_copy(self):
     #Function cmp_copy
     shex.mkdir("testdirec")
     shex.cmp_copy("testfile", "testdirec/testfilecopy")
     fh1 = open("testdirec/testfilecopy", "r")
     fh2 = open("testfile", "r")
     assert(fh1.readlines()==fh2.readlines())
     fh1.close()
     fh2.close()
     os.remove("testdirec/testfilecopy")
     os.rmdir("testdirec")
Ejemplo n.º 2
0
 def bad_cmp_copy(self):
     fh = open("filex", "w")
     fh.close()
     list = os.listdir(".")
     shex.cmp_copy("testfile", "filex")
     os.remove("filex")