Skip to content
Snippets Groups Projects
Commit 7fba0748 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

Reflect changes in Bob db driver simplification

parent 0c71662f
No related branches found
No related tags found
No related merge requests found
......@@ -83,11 +83,11 @@ class Interface(BaseInterface):
import pkg_resources # part of setuptools
return pkg_resources.require('xbob.db.%s' % self.name())[0].version
def location(self):
return os.path.dirname(os.path.realpath(__file__))
def files(self):
return ('db.sql3',)
from pkg_resources import resource_filename
raw_files = ('db.sql3',)
return [resource_filename(__name__, k) for k in raw_files]
def type(self):
return 'sqlite'
......
......@@ -15,7 +15,7 @@ from .driver import Interface
INFO = Interface()
SQLITE_FILE = os.path.join(INFO.location(), INFO.files()[0])
SQLITE_FILE = INFO.files()[0]
class Database(object):
"""The dataset class opens and maintains a connection opened to the Database.
......
......@@ -105,11 +105,11 @@ class ReplayDatabaseTest(unittest.TestCase):
for k,v in f.items():
self.assertTrue(v.find('enroll') != -1)
def test09_manage_location(self):
def test09_manage_files(self):
from bob.db.script.dbmanage import main
self.assertEqual(main('replay location'.split()), 0)
self.assertEqual(main('replay files'.split()), 0)
def test10_manage_dumplist_1(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment