Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
common_helper_files
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fact-gitdep
common_helper_files
Commits
fb1eb4f3
Commit
fb1eb4f3
authored
Apr 03, 2019
by
Jörg Stucke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
empty dir bugfix 2
parent
e50be90d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
test_fail_safe_file_operations.py
tests/test_fail_safe_file_operations.py
+6
-3
No files found.
tests/test_fail_safe_file_operations.py
View file @
fb1eb4f3
...
...
@@ -12,6 +12,10 @@ from common_helper_files import (
from
common_helper_files.fail_safe_file_operations
import
_get_counted_file_path
,
_rm_cr
EMPTY_FOLDER
=
Path
(
get_directory_for_filename
(
__file__
))
.
parent
/
'tests'
/
'data'
/
'empty_folder'
EMPTY_FOLDER
.
mkdir
(
exist_ok
=
True
)
class
TestFailSafeFileOperations
(
unittest
.
TestCase
):
def
setUp
(
self
):
...
...
@@ -149,9 +153,8 @@ def test_safe_rglob_invalid_path():
def
test_safe_rglob_empty_dir
():
test_path
=
Path
(
TestFailSafeFileOperations
.
get_directory_of_current_file
())
.
parent
/
'tests'
/
'data'
/
'empty_folder'
test_path
.
mkdir
(
exist_ok
=
True
)
result
=
safe_rglob
(
test_path
)
assert
EMPTY_FOLDER
.
exists
()
result
=
safe_rglob
(
EMPTY_FOLDER
)
assert
len
(
list
(
result
))
==
0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment