Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.bio.base
Commits
9fc33fe4
Commit
9fc33fe4
authored
Nov 24, 2020
by
Yannick DAYER
Browse files
Add a test for retrieving all samples
parent
caf1f710
Changes
1
Hide whitespace changes
Inline
Side-by-side
bob/bio/base/test/test_database_implementations.py
View file @
9fc33fe4
...
...
@@ -10,7 +10,8 @@ Very simple tests for Implementations
import
os
from
bob.bio.base.database
import
BioDatabase
,
ZTBioDatabase
from
bob.bio.base.test.dummy.database
import
database
as
dummy_database
from
bob.pipelines
import
DelayedSample
def
check_database
(
database
,
groups
=
(
'dev'
,),
protocol
=
None
,
training_depends
=
False
,
models_depend
=
False
,
skip_train
=
False
,
check_zt
=
False
):
database_legacy
=
database
.
database
...
...
@@ -51,3 +52,8 @@ def check_database_zt(database, groups=('dev', 'eval'), protocol=None, training_
assert
database_legacy
.
client_id_from_model_id
(
t_model_ids
[
0
],
group
)
is
not
None
assert
len
(
database_legacy
.
t_enroll_files
(
t_model_ids
[
0
],
group
))
>
0
assert
len
(
database_legacy
.
z_probe_files
(
group
))
>
0
def
test_all_samples
():
all_samples
=
dummy_database
.
all_samples
(
groups
=
None
)
assert
len
(
all_samples
)
==
400
assert
all
([
isinstance
(
s
,
DelayedSample
)
for
s
in
all_samples
])
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