Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
ProMod3
Manage
Activity
Members
Plan
Jira
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor 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
schwede
ProMod3
Commits
10261529
Commit
10261529
authored
10 years ago
by
Bienchen
Committed by
BIOPZ-Johner Niklaus
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Sobering up doctests
parent
562acc68
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/doc/helper.rst
+5
-0
5 additions, 0 deletions
core/doc/helper.rst
doc/conf.py.in
+17
-0
17 additions, 0 deletions
doc/conf.py.in
with
22 additions
and
0 deletions
core/doc/helper.rst
+
5
−
0
View file @
10261529
...
@@ -26,6 +26,11 @@ Messages
...
@@ -26,6 +26,11 @@ Messages
else:
else:
raise
raise
.. testoutput:: helper
:hide:
Something failed!
.. doctest:: helper
.. doctest:: helper
from promod3.core import helper
from promod3.core import helper
...
...
This diff is collapsed.
Click to expand it.
doc/conf.py.in
+
17
−
0
View file @
10261529
...
@@ -283,6 +283,23 @@ doctest_global_setup = """
...
@@ -283,6 +283,23 @@ doctest_global_setup = """
import sys
import sys
sys.path.insert(0, '@LIB_STAGE_PATH@/python@PYTHON_VERSION@/site-packages')
sys.path.insert(0, '@LIB_STAGE_PATH@/python@PYTHON_VERSION@/site-packages')
sys.path.insert(1, '@OST_ROOT@/@LIB_DIR@/python@PYTHON_VERSION@/site-packages')
sys.path.insert(1, '@OST_ROOT@/@LIB_DIR@/python@PYTHON_VERSION@/site-packages')
import ost
# We define a LogSink here, pushing everything to stdout so doctest recognises
# it.
class DocTestLogger(ost.LogSink):
def __init__(self):
ost.LogSink.__init__(self)
def LogMessage(self, message, severity):
levels = ['ERROR', 'WARNING', 'SCRIPT', 'INFO', 'VERBOSE', 'DEBUG',
'TRACE']
level = levels[severity]
print '%s' % (message),
doctest_logger = DocTestLogger()
ost.PushLogSink(doctest_logger)
"""
"""
# LocalWords: cmake
# LocalWords: cmake
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