Esempio n. 1
0
 def bad_cp(self):
     fh = open("file2","w")
     fh.close()
     list = os.listdir(".")
     shex.cp(["testfile","file2"],"file")
     assert(os.listdir(".")==list)
     os.remove("file2")
Esempio n. 2
0
 def test_cp(self):
     #Function cp
     shex.cp("testfile","testfilecopy")
     fh1 = open("testfilecopy","r")
     fh2 = open("testfile","r")
     assert(fh1.readlines()==fh2.readlines())
     fh1.close()
     fh2.close()
     os.remove("testfilecopy")