예제 #1
0
파일: test.py 프로젝트: shunfan/porter
 def test_move_to(self):
     init()
     target_directory = TargetDirectory(dir1)
     target_directory.move_to(dir2)
     assert not os.path.exists(dir1)
     assert os.path.exists(dir2_dir1)
     assert target_directory.src == dir2_dir1
예제 #2
0
파일: test.py 프로젝트: shunfan/porter
 def test_directories(self):
     init()
     target_directory = TargetDirectory(test_porter)
     assert isinstance(target_directory.directories(), list)
예제 #3
0
파일: test.py 프로젝트: shunfan/porter
 def test_list(self):
     init()
     target_directory = TargetDirectory(test_porter)
     assert isinstance(target_directory.list(), dict)
예제 #4
0
파일: test.py 프로젝트: shunfan/porter
 def test_branch(self):
     init()
     target_directory = TargetDirectory(test_porter)
     for directory in target_directory.branch():
         assert isinstance(directory, TargetDirectory)
예제 #5
0
파일: test.py 프로젝트: shunfan/porter
 def test_remove(self):
     init()
     target_directory = TargetDirectory(dir1)
     target_directory.remove()
     assert not os.path.exists(dir1)
예제 #6
0
파일: test.py 프로젝트: shunfan/porter
 def test_empty(self):
     init()
     target_directory = TargetDirectory(dir1)
     target_directory.empty()
     assert os.path.exists(dir1)
     assert not os.path.exists(dir1_f1)