Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.pad.face
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.pad.face
Commits
da1e8cb8
Commit
da1e8cb8
authored
6 years ago
by
Guillaume HEUSCH
Browse files
Options
Downloads
Patches
Plain Diff
[test] added test for maskattack db
parent
5e1e994e
No related branches found
No related tags found
1 merge request
!72
Add maskattack db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/pad/face/test/test_databases.py
+18
-0
18 additions, 0 deletions
bob/pad/face/test/test_databases.py
with
18 additions
and
0 deletions
bob/pad/face/test/test_databases.py
+
18
−
0
View file @
da1e8cb8
...
@@ -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
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment