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

Merge branch '27-fix-casia-surf-tests' into 'master'

Resolve "fix CASIA-SURF tests"

Closes #27

See merge request !91
parents 840349c5 74819f16
No related branches found
No related tags found
1 merge request!91Resolve "fix CASIA-SURF tests"
Pipeline #29327 passed
...@@ -210,11 +210,13 @@ def test_casiasurf(): ...@@ -210,11 +210,13 @@ def test_casiasurf():
preferred_package='bob.pad.face', preferred_package='bob.pad.face',
package_prefix='bob.pad.') package_prefix='bob.pad.')
try: try:
assert len(casiasurf.objects(groups=['train', 'dev'], purposes='real')) == 8942 assert len(casiasurf.objects(groups=['train'], purposes='real')) == 8942
assert len(casiasurf.objects(groups=['train'], purposes='attack')) == 20324 assert len(casiasurf.objects(groups=['train'], purposes='attack')) == 20324
assert len(casiasurf.objects(groups=['dev'], purposes='real')) == 0 assert len(casiasurf.objects(groups=('dev',), purposes=('real',))) == 2994
assert len(casiasurf.objects(groups=['dev'], purposes='attack')) == 9608 assert len(casiasurf.objects(groups=('dev',), purposes=('attack',))) == 6614
assert len(casiasurf.objects(groups=('dev',), purposes=('real','attack'))) == 9608
assert len(casiasurf.objects(groups=('eval',), purposes=('attack',))) == 57710
except IOError as e: except IOError as e:
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'"
...@@ -351,4 +353,4 @@ def test_casiasurf(): ...@@ -351,4 +353,4 @@ def test_casiasurf():
# except IOError as e: # except IOError as e:
# 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)
\ No newline at end of file
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