##// END OF EJS Templates
Initial draft of more formal notebook format....
Initial draft of more formal notebook format. * Basic Python notebook uses a simple Struct subclass, NotebookNode for representing the notebook components. * XML and JSON readers/writers work in full round trip manner. * Python reader/writter works for code cells. * Everything is tested.

File last commit:

r4401:f3a5072f
r4401:f3a5072f
Show More
test_nbpy.py
18 lines | 373 B | text/x-python | PythonLexer
from unittest import TestCase
from IPython.nbformat.nbbase import (
NotebookNode,
new_code_cell, new_text_cell, new_worksheet, new_notebook
)
from IPython.nbformat.nbpy import reads, writes
from IPython.nbformat.tests.nbexamples import nb0, nb0_py
class TestPy(TestCase):
def test_write(self):
s = writes(nb0)
self.assertEquals(s,nb0_py)