Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pystache_custom
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
pystache_custom
Commits
b56f03c4
Commit
b56f03c4
authored
Apr 13, 2012
by
Chris Jerdonek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make ImportErrors that occur while loading doctests easier to diagnose.
parent
2bb0e8da
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletions
+10
-1
pystache/tests/test_doctests.py
+10
-1
No files found.
pystache/tests/test_doctests.py
View file @
b56f03c4
...
...
@@ -13,6 +13,7 @@ Creates unittest.TestSuite instances for the doctests in the project.
import
os
import
doctest
import
pkgutil
import
traceback
import
unittest
import
pystache
...
...
@@ -82,7 +83,15 @@ def _get_module_doctests():
continue
# The loader is a pkgutil.ImpLoader instance.
loader
=
importer
.
find_module
(
module_name
)
module
=
loader
.
load_module
(
module_name
)
try
:
module
=
loader
.
load_module
(
module_name
)
except
ImportError
,
e
:
# In some situations, the test harness was swallowing and/or
# suppressing the display of the stack trace when errors
# occurred here. The following code makes errors occurring here
# easier to troubleshoot.
details
=
""
.
join
(
traceback
.
format_exception
(
*
sys
.
exc_info
()))
raise
ImportError
(
details
)
modules
.
append
(
module
)
return
modules
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