mirror of
https://github.com/arsenetar/dupeguru.git
synced 2026-01-22 14:41:39 +00:00
Merge remote-tracking branch 'upstream/master' into colors-bytes
This commit is contained in:
@@ -12,7 +12,6 @@ from hscommon.testutil import eq_
|
||||
try:
|
||||
from core.pe.cache import colors_to_bytes, bytes_to_colors
|
||||
from core.pe.cache_sqlite import SqliteCache
|
||||
from core.pe.cache_shelve import ShelveCache
|
||||
except ImportError:
|
||||
skip("Can't import the cache module, probably hasn't been compiled.")
|
||||
|
||||
@@ -134,11 +133,6 @@ class TestCaseSqliteCache(BaseTestCaseCache):
|
||||
eq_(c["foo"], [(1, 2, 3)])
|
||||
|
||||
|
||||
class TestCaseShelveCache(BaseTestCaseCache):
|
||||
def get_cache(self, dbname=None):
|
||||
return ShelveCache(dbname)
|
||||
|
||||
|
||||
class TestCaseCacheSQLEscape:
|
||||
def get_cache(self):
|
||||
return SqliteCache()
|
||||
|
||||
@@ -17,6 +17,7 @@ from core.scanner import Scanner, ScanType
|
||||
from core.me.scanner import ScannerME
|
||||
|
||||
|
||||
# TODO update this to be able to inherit from fs.File
|
||||
class NamedObject:
|
||||
def __init__(self, name="foobar", size=1, path=None):
|
||||
if path is None:
|
||||
@@ -31,6 +32,9 @@ class NamedObject:
|
||||
def __repr__(self):
|
||||
return "<NamedObject {!r} {!r}>".format(self.name, self.path)
|
||||
|
||||
def exists(self):
|
||||
return self.path.exists()
|
||||
|
||||
|
||||
no = NamedObject
|
||||
|
||||
|
||||
Reference in New Issue
Block a user