Commit c0983e3f authored by Yannick DAYER's avatar Yannick DAYER
Browse files

Adapt to all_samples method of db

parent 32394265
Pipeline #46052 passed with stage
in 34 minutes and 10 seconds
......@@ -154,28 +154,8 @@ def display_face_annotations(
Plots annotations on the corresponding face picture.
logger.debug("Retrieving background model samples from database.")
background_model_samples = database.background_model_samples()
logger.debug("Retrieving references and probes samples from database.")
references_samplesets = []
probes_samplesets = []
for group in groups:
# Unravels all samples in one list (no SampleSets)
samples = background_model_samples
for r in references_samplesets
for sample in r.samples
for p in probes_samplesets
for sample in p.samples
logger.debug("Retrieving samples from database.")
samples = database.all_samples(groups)
logger.debug(f"{len(samples)} samples loaded from database.")
......@@ -18,7 +18,7 @@ def test_display_annotations():
'--database', 'dummy',
'--groups', 'dev',
'--groups', 'world', '--groups', 'dev',
'--annotations-dir', annotations_dir,
'--output-dir', tmp_dir, '--keep-all',
......@@ -28,7 +28,7 @@ def test_display_annotations():
'Command exited with this output: `{}\' \n'
'If the output is empty, you can run this script locally to see '
'what is wrong:\n'
'$ bob bio display_face_annotations -vvv -d dummy -g dev -a ./annotations/ -o /tmp/temp_annotated'
'$ bob bio display_face_annotations -vvv -d dummy -g world -g dev -a ./annotations/ -o /tmp/temp_annotated'
assert result.exit_code == 0, assertion_error_message
Markdown is supported
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