-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
43 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
import tempfile | ||
# import tempfile | ||
|
||
import pytest | ||
from crocodile.file_management import * | ||
# import pytest | ||
# from crocodile.file_management import * | ||
|
||
|
||
class Test_P: | ||
@staticmethod | ||
def test_copy(): | ||
folder = P.tmp(folder="__test__/test_folder").create() | ||
file = P.tmp(file="__test__/test_file").write_text("file content") | ||
dest = P.tmp(folder="__test__/test_destination") | ||
# class Test_P: | ||
# @staticmethod | ||
# def test_copy(): | ||
# folder = P.tmp(folder="__test__/test_folder").create() | ||
# file = P.tmp(file="__test__/test_file").write_text("file content") | ||
# dest = P.tmp(folder="__test__/test_destination") | ||
|
||
folder.copy(path=dest / "folder_copy_path_passed") | ||
folder.copy(folder=dest / "folder_copy_folder_passed") | ||
folder.copy(folder=dest / "folder_copy_folder_passed_2", name="name_passed_after_folder") | ||
assert (dest / "folder_copy_path_passed").is_dir() | ||
assert (dest / "folder_copy_folder_passed").is_dir() | ||
assert (dest / "folder_copy_folder_passed_2/name_passed_after_folder").is_dir() | ||
# folder.copy(path=dest / "folder_copy_path_passed") | ||
# folder.copy(folder=dest / "folder_copy_folder_passed") | ||
# folder.copy(folder=dest / "folder_copy_folder_passed_2", name="name_passed_after_folder") | ||
# assert (dest / "folder_copy_path_passed").is_dir() | ||
# assert (dest / "folder_copy_folder_passed").is_dir() | ||
# assert (dest / "folder_copy_folder_passed_2/name_passed_after_folder").is_dir() | ||
|
||
file.copy(path=dest / "file_copy_path_passed") | ||
file.copy(folder=dest / "file_copy_folder_passed") | ||
file.copy(folder=dest / "file_copy_folder_passed_2", name="name_passed_after_folder") | ||
# file.copy(path=dest / "file_copy_path_passed") | ||
# file.copy(folder=dest / "file_copy_folder_passed") | ||
# file.copy(folder=dest / "file_copy_folder_passed_2", name="name_passed_after_folder") | ||
|
||
@staticmethod | ||
def test_zip(): | ||
folder = P.tmp(folder="__test__/test_folder") | ||
folder.joinpath("test_content").touch() | ||
# @staticmethod | ||
# def test_zip(): | ||
# folder = P.tmp(folder="__test__/test_folder") | ||
# folder.joinpath("test_content").touch() | ||
|
||
folder.zip() | ||
# folder.zip() |