mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-09 13:24:35 +00:00
Fixed core_me.scanner_test
This commit is contained in:
parent
cbf2ab82ce
commit
2128d1787a
@ -11,18 +11,9 @@ from hscommon import io
|
||||
from hscommon.path import Path
|
||||
|
||||
from core.engine import getwords
|
||||
from core.tests.scanner_test import NamedObject, no
|
||||
from ..scanner import *
|
||||
|
||||
class NamedObject:
|
||||
def __init__(self, name="foobar", size=1):
|
||||
self.name = name
|
||||
self.size = size
|
||||
self.path = Path('')
|
||||
self.words = getwords(name)
|
||||
|
||||
|
||||
no = NamedObject
|
||||
|
||||
def pytest_funcarg__fake_fileexists(request):
|
||||
# This is a hack to avoid invalidating all previous tests since the scanner started to test
|
||||
# for file existence before doing the match grouping.
|
||||
@ -32,7 +23,7 @@ def pytest_funcarg__fake_fileexists(request):
|
||||
def test_priorize_me(fake_fileexists):
|
||||
# in ScannerME, bitrate goes first (right after is_ref) in priorization
|
||||
s = ScannerME()
|
||||
o1, o2 = no('foo'), no('foo')
|
||||
o1, o2 = no('foo', path='p1'), no('foo', path='p2')
|
||||
o1.bitrate = 1
|
||||
o2.bitrate = 2
|
||||
[group] = s.get_dupe_groups([o1, o2])
|
||||
|
Loading…
x
Reference in New Issue
Block a user