diff --git a/bob/bio/vein/database/biowave_test.py b/bob/bio/vein/database/biowave_test.py index dc6d57cc6594f8e5239d4dd4febb2d373831c3d5..4cd7f13afb164d34603cdf84456f512ee7c6b478 100644 --- a/bob/bio/vein/database/biowave_test.py +++ b/bob/bio/vein/database/biowave_test.py @@ -45,7 +45,7 @@ class BiowaveTestBioDatabase(BioDatabase): def objects(self, protocol=None, groups=None, purposes=None, model_ids=None, **kwargs): retval = self.__db.objects(protocol=protocol, groups=groups, purposes=purposes, model_ids=model_ids) - return [VeinBioFile(client_id=f.client_id, path=f.path, file_id=f.file_id) for f in retval] + return [VeinBioFile(client_id=f.client_id, path=f.path, file_id=f.id) for f in retval] # the methodes are derived from: # bob.bio.db/bob/bio/db/database.py diff --git a/bob/bio/vein/database/database.py b/bob/bio/vein/database/database.py index 3a252f358e2cf6405a7a696f2281e3476b2c0c5f..6e78633b77722d413a3334f7c8a6ff968f997083 100644 --- a/bob/bio/vein/database/database.py +++ b/bob/bio/vein/database/database.py @@ -17,7 +17,3 @@ class VeinBioFile(BioFile): VoxForge database. """ super(VeinBioFile, self).__init__(client_id=client_id, path=path, file_id=file_id) - - self.__f = f - - diff --git a/bob/bio/vein/database/utfvp.py b/bob/bio/vein/database/utfvp.py index fe27084e5e18f9cb3f6886c175c1bb6d1092bdef..e6a6bb9aece8c506c8bc1302c6d666a324b91f26 100644 --- a/bob/bio/vein/database/utfvp.py +++ b/bob/bio/vein/database/utfvp.py @@ -26,4 +26,4 @@ class UtfvpBioDatabase(BioDatabase): retval = self.__db.objects(groups=groups, protocol=protocol, purposes=purposes, model_ids=model_ids, **kwargs) - return [VeinBioFile(client_id=f.client_id, path=f.path, file_id=f.file_id) for f in retval] + return [VeinBioFile(client_id=f.client_id, path=f.path, file_id=f.id) for f in retval] diff --git a/bob/bio/vein/database/verafinger.py b/bob/bio/vein/database/verafinger.py index 5725b6e9bbdceb1b21ce1b9897553d2c6e188ef1..3a88eaee1026448d16a77cff8608f92fd844117c 100644 --- a/bob/bio/vein/database/verafinger.py +++ b/bob/bio/vein/database/verafinger.py @@ -44,4 +44,4 @@ class VerafingerBioDatabase(BioDatabase): self.low_level_group_names, self.high_level_group_names) retval = self.__db.objects(groups=groups, protocol=protocol, purposes=purposes, model_ids=model_ids, **kwargs) - return [VeinBioFile(client_id=f.client_id, path=f.path, file_id=f.file_id) for f in retval] + return [VeinBioFile(client_id=f.model_id, path=f.path, file_id=f.id) for f in retval] diff --git a/bob/bio/vein/tests/test_databases.py b/bob/bio/vein/tests/test_databases.py new file mode 100644 index 0000000000000000000000000000000000000000..4e05beb3264c6911b2be43e6eee835f0363ee4cb --- /dev/null +++ b/bob/bio/vein/tests/test_databases.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python +# vim: set fileencoding=utf-8 : +# @author: Manuel Guenther +# @date: Thu May 24 10:41:42 CEST 2012 +# +# Copyright (C) 2011-2012 Idiap Research Institute, Martigny, Switzerland +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +from nose.plugins.skip import SkipTest + +import bob.bio.base +from bob.bio.base.test.utils import db_available +from bob.bio.base.test.test_database_implementations import check_database, check_database_zt + + +@db_available('utfvp') +def test_utfvp(): + database = bob.bio.base.load_resource('utfvp', 'database', preferred_package='bob.bio.vein') + try: + check_database(database, protocol='nomLeftRing', groups=('dev', 'eval')) + except IOError as e: + raise SkipTest( + "The database could not queried; probably the db.sql3 file is missing. Here is the error: '%s'" % e) + + +@db_available('verafinger') +def test_verafinger(): + database = bob.bio.base.load_resource('verafinger', 'database', preferred_package='bob.bio.vein') + try: + check_database(database, protocol='Fifty', groups=('dev', 'eval')) + except IOError as e: + raise SkipTest( + "The database could not queried; probably the db.sql3 file is missing. Here is the error: '%s'" % e)