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
bc9cb342
Commit
bc9cb342
authored
Dec 02, 2020
by
Amir MOHAMMADI
Browse files
[test.utils] Handle ModuleNotFoundError when bob.db.atnt is not available
parent
52934fcb
Pipeline
#46247
passed with stage
in 5 minutes and 37 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bob/bio/base/test/utils.py
View file @
bc9cb342
...
...
@@ -9,7 +9,11 @@ import sys
import
functools
from
nose.plugins.skip
import
SkipTest
import
importlib
from
bob.db.atnt.models
import
DEFAULT_DATADIR
as
ATNT_DEFAULT_DIR
try
:
from
bob.db.atnt.models
import
DEFAULT_DATADIR
as
ATNT_DEFAULT_DIR
except
ModuleNotFoundError
:
ATNT_DEFAULT_DIR
=
None
# based on: http://stackoverflow.com/questions/6796492/temporarily-redirect-stdout-stderr
class
Quiet
(
object
):
...
...
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