mirror of
https://github.com/arsenetar/dupeguru.git
synced 2026-01-22 14:41:39 +00:00
Add shelve-based picture cache implementation
Hopefully, this will fix #394 for real this time, that is, without the need for a messy python executable ship in the app.
This commit is contained in:
@@ -12,6 +12,7 @@ from hscommon.testutil import eq_
|
||||
try:
|
||||
from ..pe.cache import colors_to_string, string_to_colors
|
||||
from ..pe.cache_sqlite import SqliteCache
|
||||
from ..pe.cache_shelve import ShelveCache
|
||||
except ImportError:
|
||||
skip("Can't import the cache module, probably hasn't been compiled.")
|
||||
|
||||
@@ -131,6 +132,11 @@ 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()
|
||||
|
||||
Reference in New Issue
Block a user