Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
S
sweeper
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Darko Poljak
sweeper
Commits
3ddd76fc
Commit
3ddd76fc
authored
Jan 28, 2014
by
Darko Poljak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added tests for iter_file_dups
parent
63bb9779
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
test/test_sweeper.py
test/test_sweeper.py
+10
-1
No files found.
test/test_sweeper.py
View file @
3ddd76fc
...
...
@@ -3,7 +3,7 @@
# License: GPLv3
import
unittest
from
sweeper
import
file_dups
from
sweeper
import
file_dups
,
iter_file_dups
import
os
mydir
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
...
...
@@ -23,6 +23,15 @@ class TestSweeper(unittest.TestCase):
for
h
,
flist
in
dups
.
items
():
self
.
assertTrue
(
len
(
flist
)
==
1
)
def
test_iter_fule_dups_rethash
(
self
):
for
item
in
iter_file_dups
([
os
.
path
.
join
(
mydir
,
'testfiles_dups'
)],
rethash
=
True
):
self
.
assertTrue
(
type
(
item
).
__name__
==
'tuple'
)
def
test_iter_fule_dups_norethash
(
self
):
for
item
in
iter_file_dups
([
os
.
path
.
join
(
mydir
,
'testfiles_dups'
)]):
self
.
assertTrue
(
type
(
item
).
__name__
==
'list'
)
if
__name__
==
'__main__'
:
unittest
.
main
()
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