Ejemplo n.º 1
0
 def test_FileDict_copyandrename(self):
     """FileDict can digest the a ComponentFile with the copy method, and rename it"""
     TestList = FileDict({
         "my_testfile":
         ComponentFile(src="testfile_original", dest="testfile_copy")
     })
     TestList.digest()
     assert os.path.isfile("./testfile_copy")
     self.cleanup_list.append("testfile_copy")
Ejemplo n.º 2
0
 def test_FileDict_digest_empty(self):
     """FileDict are empty after digestion with flag=work"""
     TestList = FileDict({
         "my link":
         ComponentFile(src="testfile_original",
                       dest="testfile_link_newlink",
                       copy_method="link")
     })
     TestList.digest(flag="work")
     self.assertEqual(len(TestList), 0)
     self.cleanup_list.append("testfile_link_newlink")
Ejemplo n.º 3
0
 def test_FileDict_linkandrename(self):
     """FileDict can digest the a ComponentFile with the link method, and rename it"""
     TestList = FileDict({
         "my link":
         ComponentFile(src="testfile_original",
                       dest="testfile_link",
                       copy_method="link")
     })
     TestList.digest()
     assert os.path.islink("./testfile_link")
     self.cleanup_list.append("testfile_link")