def test_FileExistsError(self): init() with raises(FileExistsError): mkdir(test_porter) init() with raises(FileExistsError): copy(dir1_f1, dir2_f2) init() with raises(FileExistsError): copy(dir1, dir2)
def test_directory(self): init() copy(dir1, dir2_dir1) copy(dir1, dir2_dir1, ignore=True) copy(dir1, dir2_dir1, force=True) assert os.path.exists(dir1) == True assert os.path.exists(dir2_dir1) == True
def test_file(self): init() copy(dir1_f1, dir2_f1) copy(dir1_f1, dir2_f1, ignore=True) copy(dir1_f1, dir2_f1, force=True) assert os.path.exists(dir1_f1) == True assert os.path.exists(dir2_f1) == True