added file_dups_immediate function
This commit is contained in:
parent
12df9e5a7e
commit
3cc886f057
1 changed files with 9 additions and 1 deletions
|
@ -3,7 +3,7 @@
|
|||
# License: GPLv3
|
||||
|
||||
import unittest
|
||||
from sweeper import file_dups, iter_file_dups
|
||||
from sweeper import file_dups, iter_file_dups, file_dups_immediate
|
||||
import os
|
||||
|
||||
mydir = os.path.dirname(os.path.realpath(__file__))
|
||||
|
@ -42,6 +42,14 @@ class TestSweeper(unittest.TestCase):
|
|||
dups_exist = True
|
||||
self.assertTrue(dups_exist)
|
||||
|
||||
def test_file_dups_immediate_dups(self):
|
||||
it = file_dups_immediate([os.path.join(mydir, 'testfiles_dups')])
|
||||
dups_exist = False
|
||||
for x in it:
|
||||
dups_exist = True
|
||||
break
|
||||
self.assertTrue(dups_exist)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
Loading…
Add table
Reference in a new issue