test_nbpy.py 319 B

1234567891011121314151617
  1. from unittest import TestCase
  2. from ..nbbase import (
  3. NotebookNode,
  4. new_code_cell, new_text_cell, new_worksheet, new_notebook
  5. )
  6. from ..nbpy import reads, writes
  7. from .nbexamples import nb0, nb0_py
  8. class TestPy(TestCase):
  9. def test_write(self):
  10. s = writes(nb0)
  11. self.assertEqual(s,nb0_py)