##// END OF EJS Templates
nbconvert requires mistune...
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

File last commit:

r12781:1411cb6d
r17585:fcfb06b0
Show More
test_reader.py
38 lines | 1.3 KiB | text/x-python | PythonLexer
"""
Contains tests class for reader.py
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2013 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed as part of this software.
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
from .base import TestsBase
from ..reader import read, get_version
#-----------------------------------------------------------------------------
# Classes and functions
#-----------------------------------------------------------------------------
class TestReader(TestsBase):
def test_read(self):
"""Can older notebooks be opened without modification?"""
# Open a version 3 notebook. Make sure it is still version 3.
with self.fopen(u'test3.ipynb', u'r') as f:
nb = read(f)
(major, minor) = get_version(nb)
self.assertEqual(major, 3)
# Open a version 2 notebook. Make sure it is still version 2.
with self.fopen(u'test2.ipynb', u'r') as f:
nb = read(f)
(major, minor) = get_version(nb)
self.assertEqual(major, 2)