test_databases.py 1.08 KB
Newer Older
1
2
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
André Anjos's avatar
André Anjos committed
3
# Thu May 24 10:41:42 CEST 2012
4
5
6
7
8

from nose.plugins.skip import SkipTest

import bob.bio.base
from bob.bio.base.test.utils import db_available
André Anjos's avatar
André Anjos committed
9
from bob.bio.base.test.test_database_implementations import check_database
10
11
12
13


@db_available('utfvp')
def test_utfvp():
André Anjos's avatar
André Anjos committed
14
15
    module = bob.bio.base.load_resource('utfvp', 'config',
        preferred_package='bob.bio.vein')
16
    try:
André Anjos's avatar
André Anjos committed
17
18
        check_database(module.database, protocol=module.protocol,
            groups=('dev', 'eval'))
19
20
21
22
23
24
25
    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():
André Anjos's avatar
André Anjos committed
26
27
    module = bob.bio.base.load_resource('verafinger', 'config',
        preferred_package='bob.bio.vein')
28
    try:
André Anjos's avatar
André Anjos committed
29
30
        check_database(module.database, protocol='Fifty', groups=('dev',
          'eval'))
31
32
33
    except IOError as e:
        raise SkipTest(
            "The database could not queried; probably the db.sql3 file is missing. Here is the error: '%s'" % e)