mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-10 05:34:36 +00:00
Fix test that became flaky under Python v3.3.
This commit is contained in:
parent
e0b844f617
commit
07de7d6f0e
@ -446,7 +446,7 @@ def test_tie_breaker_same_name_plus_digit(fake_fileexists):
|
|||||||
assert group.ref is o5
|
assert group.ref is o5
|
||||||
|
|
||||||
def test_partial_group_match(fake_fileexists):
|
def test_partial_group_match(fake_fileexists):
|
||||||
# Count the number od discarded matches (when a file doesn't match all other dupes of the
|
# Count the number of discarded matches (when a file doesn't match all other dupes of the
|
||||||
# group) in Scanner.discarded_file_count
|
# group) in Scanner.discarded_file_count
|
||||||
s = Scanner()
|
s = Scanner()
|
||||||
o1, o2, o3 = no('a b'), no('a'), no('b')
|
o1, o2, o3 = no('a b'), no('a'), no('b')
|
||||||
@ -454,8 +454,12 @@ def test_partial_group_match(fake_fileexists):
|
|||||||
[group] = s.get_dupe_groups([o1, o2, o3])
|
[group] = s.get_dupe_groups([o1, o2, o3])
|
||||||
eq_(len(group), 2)
|
eq_(len(group), 2)
|
||||||
assert o1 in group
|
assert o1 in group
|
||||||
assert o2 in group
|
# The file that will actually be counted as a dupe is undefined. The only thing we want to test
|
||||||
assert o3 not in group
|
# is that we don't have both
|
||||||
|
if o2 in group:
|
||||||
|
assert o3 not in group
|
||||||
|
else:
|
||||||
|
assert o3 in group
|
||||||
eq_(s.discarded_file_count, 1)
|
eq_(s.discarded_file_count, 1)
|
||||||
|
|
||||||
def test_dont_group_files_that_dont_exist(tmpdir):
|
def test_dont_group_files_that_dont_exist(tmpdir):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user