Commit ec51cfc3 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

Merge branch 'database_tests' into 'master'

Fixed database test to incorporate the no_zt option from !80; closes bob.bio.spear#28

Closes bob.bio.spear#28

See merge request !89
parents e7113deb d9676c0c
Pipeline #11577 passed with stages
in 15 minutes and 55 seconds
...@@ -12,7 +12,7 @@ import os ...@@ -12,7 +12,7 @@ import os
from bob.bio.base.database import BioDatabase, ZTBioDatabase from bob.bio.base.database import BioDatabase, ZTBioDatabase
def check_database(database, groups=('dev',), protocol=None, training_depends=False, models_depend=False, skip_train=False): def check_database(database, groups=('dev',), protocol=None, training_depends=False, models_depend=False, skip_train=False, check_zt=False):
assert isinstance(database, BioDatabase) assert isinstance(database, BioDatabase)
# load the directories # load the directories
...@@ -24,7 +24,7 @@ def check_database(database, groups=('dev',), protocol=None, training_depends=Fa ...@@ -24,7 +24,7 @@ def check_database(database, groups=('dev',), protocol=None, training_depends=Fa
if protocol is None: if protocol is None:
protocol = database.protocol protocol = database.protocol
assert len(database.all_files()) > 0 assert len(database.all_files(add_zt_files=check_zt)) > 0
if not skip_train: if not skip_train:
assert len(database.training_files('train_extractor')) > 0 assert len(database.training_files('train_extractor')) > 0
assert len(database.arrange_by_client(database.training_files('train_enroller'))) > 0 assert len(database.arrange_by_client(database.training_files('train_enroller'))) > 0
...@@ -41,7 +41,7 @@ def check_database(database, groups=('dev',), protocol=None, training_depends=Fa ...@@ -41,7 +41,7 @@ def check_database(database, groups=('dev',), protocol=None, training_depends=Fa
def check_database_zt(database, groups=('dev', 'eval'), protocol=None, training_depends=False, models_depend=False): def check_database_zt(database, groups=('dev', 'eval'), protocol=None, training_depends=False, models_depend=False):
check_database(database, groups, protocol, training_depends, models_depend) check_database(database, groups, protocol, training_depends, models_depend, check_zt=True)
assert isinstance(database, ZTBioDatabase) assert isinstance(database, ZTBioDatabase)
for group in groups: for group in groups:
t_model_ids = database.t_model_ids(group) t_model_ids = database.t_model_ids(group)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment