Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.bio.base
Commits
fccd28b1
Commit
fccd28b1
authored
Sep 20, 2016
by
Tiago de Freitas Pereira
Browse files
Solving Issue
#38
- BioDatabase method training_files causes tests to fail
parent
e7722c0c
Pipeline
#3809
passed with stages
in 62 minutes and 24 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bob/bio/base/test/test_database_implementations.py
View file @
fccd28b1
...
...
@@ -12,7 +12,7 @@ import os
from
bob.bio.base.database
import
BioDatabase
,
ZTBioDatabase
def
check_database
(
database
,
groups
=
(
'dev'
,),
protocol
=
None
,
training_depends
=
False
,
models_depend
=
False
):
def
check_database
(
database
,
groups
=
(
'dev'
,),
protocol
=
None
,
training_depends
=
False
,
models_depend
=
False
,
skip_train
=
False
):
assert
isinstance
(
database
,
BioDatabase
)
# load the directories
...
...
@@ -23,8 +23,9 @@ def check_database(database, groups=('dev',), protocol=None, training_depends=Fa
if
protocol
is
None
:
protocol
=
database
.
protocol
assert
len
(
database
.
all_files
())
>
0
assert
len
(
database
.
training_files
(
'train_extractor'
))
>
0
assert
len
(
database
.
arrange_by_client
(
database
.
training_files
(
'train_enroller'
)))
>
0
if
not
skip_train
:
assert
len
(
database
.
training_files
(
'train_extractor'
))
>
0
assert
len
(
database
.
arrange_by_client
(
database
.
training_files
(
'train_enroller'
)))
>
0
for
group
in
groups
:
model_ids
=
database
.
model_ids_with_protocol
(
group
,
protocol
=
protocol
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment