Skip to content
Snippets Groups Projects
Commit da1e8cb8 authored by Guillaume HEUSCH's avatar Guillaume HEUSCH
Browse files

[test] added test for maskattack db

parent 5e1e994e
No related branches found
No related tags found
1 merge request!72Add maskattack db
...@@ -167,3 +167,21 @@ def test_aggregated_db(): ...@@ -167,3 +167,21 @@ def test_aggregated_db():
raise SkipTest( raise SkipTest(
"The database could not be queried; probably the db.sql3 file is missing. Here is the error: '%s'" "The database could not be queried; probably the db.sql3 file is missing. Here is the error: '%s'"
% e) % e)
# Test the Aggregated database, which doesn't have a package
def test_maskattack_db():
aggregated_db = bob.bio.base.load_resource(
'maskattack',
'database',
preferred_package='bob.pad.face',
package_prefix='bob.pad.')
try:
assert len(aggregated_db.objects(groups=['train', 'dev', 'eval'])) == 255
assert len(aggregated_db.objects(groups=['train', 'dev'])) == 150
assert len(aggregated_db.objects(groups=['train'])) == 105
except IOError as e:
raise SkipTest(
"The database could not be queried; probably the db.sql3 file is missing. Here is the error: '%s'"
% e)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment