Skip to content

Commit fcfb06b

Browse files
committed
nbconvert requires mistune
You get a cryptic error message from iptest if mistune is not installed. Test group: nbconvert E ====================================================================== ERROR: Failure: AttributeError ('module' object has no attribute 'nbconvert') ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 403, in loadTestsFromName module = resolve_name(addr.module) File "/usr/lib/python2.7/dist-packages/nose/util.py", line 321, in resolve_name obj = getattr(obj, part) AttributeError: 'module' object has no attribute 'nbconvert' ---------------------------------------------------------------------- Ran 1 test in 0.001s FAILED (errors=1
1 parent 3d09832 commit fcfb06b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

IPython/testing/iptest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ def test_for(item, min_version=None, callback=extract_version):
145145
have['cython'] = test_for('Cython')
146146
have['tornado'] = test_for('tornado.version_info', (3,1,0), callback=None)
147147
have['jinja2'] = test_for('jinja2')
148+
have['mistune'] = test_for('mistune')
148149
have['requests'] = test_for('requests')
149150
have['sphinx'] = test_for('sphinx')
150151
have['jsonschema'] = test_for('jsonschema')
@@ -287,7 +288,7 @@ def will_run(self):
287288

288289
# nbconvert:
289290
sec = test_sections['nbconvert']
290-
sec.requires('pygments', 'jinja2', 'jsonschema', 'jsonpointer')
291+
sec.requires('pygments', 'jinja2', 'jsonschema', 'jsonpointer', 'mistune')
291292
# Exclude nbconvert directories containing config files used to test.
292293
# Executing the config files with iptest would cause an exception.
293294
sec.exclude('tests.files')

0 commit comments

Comments
 (0)