@@ -28,7 +28,7 @@ def log_and_raise_if_path_does_not_exist(path: pathlib.Path) -> None:
2828 >>> log_and_raise_if_path_does_not_exist(test_existing_file)
2929
3030 >>> # Test Raise
31- >>> log_and_raise_if_path_does_not_exist(test_non_existing) # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
31+ >>> log_and_raise_if_path_does_not_exist(test_non_existing)
3232 Traceback (most recent call last):
3333 ...
3434 FileNotFoundError: path does not exist: does_not_exist
@@ -50,13 +50,13 @@ def log_and_raise_if_not_isdir(path_dir: pathlib.Path) -> None:
5050 >>> log_and_raise_if_not_isdir(test_dir_exist)
5151
5252 >>> # TEST non existent
53- >>> log_and_raise_if_not_isdir(test_dir_not_exist) # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
53+ >>> log_and_raise_if_not_isdir(test_dir_not_exist)
5454 Traceback (most recent call last):
5555 ...
5656 NotADirectoryError: not a directory : does_not_exist
5757
5858 >>> # TEST is file
59- >>> log_and_raise_if_not_isdir(test_dir_not_exist) # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
59+ >>> log_and_raise_if_not_isdir(test_dir_not_exist)
6060 Traceback (most recent call last):
6161 ...
6262 NotADirectoryError: not a directory : does_not_exist
@@ -72,18 +72,18 @@ def log_and_raise_if_not_isdir(path_dir: pathlib.Path) -> None:
7272def log_and_raise_if_target_directory_within_source_directory (path_source_dir : pathlib .Path , path_target_dir : pathlib .Path ) -> None :
7373 """
7474 >>> # Setup
75- >>> path_source_dir=pathlib.Path('/test')
76- >>> path_target_dir_ok=pathlib.Path('/test2/test')
77- >>> path_target_dir_err=pathlib.Path('/test/test2')
75+ >>> path_source_dir=pathlib.Path('. /test')
76+ >>> path_target_dir_ok=pathlib.Path('. /test2/test')
77+ >>> path_target_dir_err=pathlib.Path('. /test/test2')
7878
7979 >>> # Test OK
8080 >>> log_and_raise_if_target_directory_within_source_directory(path_source_dir, path_target_dir_ok)
8181
8282 >>> # Test ERR
83- >>> log_and_raise_if_target_directory_within_source_directory(path_source_dir, path_target_dir_err) # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
83+ >>> log_and_raise_if_target_directory_within_source_directory(path_source_dir, path_target_dir_err)
8484 Traceback (most recent call last):
8585 ...
86- FileExistsError: target directory: "/test/test2 " is within the source directory "/test "
86+ FileExistsError: target directory: "... " is within the source directory "... "
8787
8888 """
8989 if is_target_directory_within_source_directory (path_source_dir , path_target_dir ):
@@ -111,7 +111,7 @@ def log_and_raise_if_not_isfile(path_file: pathlib.Path) -> None:
111111 >>> log_and_raise_if_not_isfile(path_file_ok)
112112
113113 >>> # TEST ERR
114- >>> log_and_raise_if_not_isfile(path_file_err) # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
114+ >>> log_and_raise_if_not_isfile(path_file_err)
115115 Traceback (most recent call last):
116116 ...
117117 FileNotFoundError: file does not exist or no permission: does_not_exist
@@ -278,7 +278,7 @@ def get_l_path_sub_directories(path_base_directory: pathlib.Path) -> List[pathli
278278 >>> path_dir_with_subdirs = path_test_dir / 'dir_with_subdirs'
279279 >>> path_dir_without_subdirs = path_test_dir / 'dir_without_subdirs'
280280
281- >>> get_l_path_sub_directories(path_dir_with_subdirs) # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
281+ >>> get_l_path_sub_directories(path_dir_with_subdirs)
282282 [...Path('subdir')]
283283 >>> get_l_path_sub_directories(path_dir_without_subdirs)
284284 []
0 commit comments