##// END OF EJS Templates
NBFormatTest is now a mixin, rather than a base class
MinRK -
Show More
@@ -6,8 +6,6 b' import tempfile'
6 6
7 7 pjoin = os.path.join
8 8
9 from unittest import TestCase
10
11 9 from ..nbbase import (
12 10 NotebookNode,
13 11 new_code_cell, new_text_cell, new_worksheet, new_notebook
@@ -20,7 +18,8 b' from .nbexamples import nb0, nb0_py'
20 18 def open_utf8(fname, mode):
21 19 return io.open(fname, mode=mode, encoding='utf-8')
22 20
23 class NBFormatTestCase(TestCase):
21 class NBFormatTest:
22 """Mixin for writing notebook format tests"""
24 23
25 24 # override with appropriate values in subclasses
26 25 nb0_ref = None
@@ -61,4 +60,4 b' class NBFormatTestCase(TestCase):'
61 60 nb = self.mod.read(f)
62 61
63 62
64
63
@@ -10,7 +10,7 b' from . import formattest'
10 10 from .nbexamples import nb0
11 11
12 12
13 class TestJSON(formattest.NBFormatTestCase):
13 class TestJSON(formattest.NBFormatTest, TestCase):
14 14
15 15 nb0_ref = None
16 16 ext = 'ipynb'
@@ -1,11 +1,14 b''
1 1 # -*- coding: utf8 -*-
2
3 from unittest import TestCase
4
2 5 from . import formattest
3 6
4 7 from .. import nbpy
5 8 from .nbexamples import nb0, nb0_py
6 9
7 10
8 class TestPy(formattest.NBFormatTestCase):
11 class TestPy(formattest.NBFormatTest, TestCase):
9 12
10 13 nb0_ref = nb0_py
11 14 ext = 'py'
General Comments 0
You need to be logged in to leave comments. Login now