##// END OF EJS Templates
Remove ParametricTestCase from nbconvert tests
Thomas Kluyver -
Show More
@@ -39,7 +39,7 b' class TestAnsi(TestsBase):'
39 39 'hello' : 'hello'}
40 40
41 41 for inval, outval in correct_outputs.items():
42 yield self._try_strip_ansi(inval, outval)
42 self._try_strip_ansi(inval, outval)
43 43
44 44
45 45 def _try_strip_ansi(self, inval, outval):
@@ -58,7 +58,7 b' class TestAnsi(TestsBase):'
58 58 'hello' : 'hello'}
59 59
60 60 for inval, outval in correct_outputs.items():
61 yield self._try_ansi2html(inval, outval)
61 self._try_ansi2html(inval, outval)
62 62
63 63
64 64 def _try_ansi2html(self, inval, outval):
@@ -77,7 +77,7 b' class TestAnsi(TestsBase):'
77 77 'hello' : 'hello'}
78 78
79 79 for inval, outval in correct_outputs.items():
80 yield self._try_ansi2latex(inval, outval)
80 self._try_ansi2latex(inval, outval)
81 81
82 82
83 83 def _try_ansi2latex(self, inval, outval):
@@ -49,13 +49,13 b' class TestHighlight(TestsBase):'
49 49 def test_highlight2html(self):
50 50 """highlight2html test"""
51 51 for index, test in enumerate(self.tests):
52 yield self._try_highlight(highlight2html, test, self.tokens[index])
52 self._try_highlight(highlight2html, test, self.tokens[index])
53 53
54 54
55 55 def test_highlight2latex(self):
56 56 """highlight2latex test"""
57 57 for index, test in enumerate(self.tests):
58 yield self._try_highlight(highlight2latex, test, self.tokens[index])
58 self._try_highlight(highlight2latex, test, self.tokens[index])
59 59
60 60
61 61 def _try_highlight(self, method, test, tokens):
@@ -35,7 +35,7 b' class TestLatex(TestsBase):'
35 35 ('','')]
36 36
37 37 for test in tests:
38 yield self._try_escape_latex(test[0], test[1])
38 self._try_escape_latex(test[0], test[1])
39 39
40 40
41 41 def _try_escape_latex(self, test, result):
@@ -56,7 +56,7 b' class TestLatex(TestsBase):'
56 56 ('','')]
57 57
58 58 for test in tests:
59 yield self._try_strip_math_space(test[0], test[1])
59 self._try_strip_math_space(test[0], test[1])
60 60
61 61
62 62 def _try_strip_math_space(self, test, result):
@@ -61,14 +61,14 b' class TestMarkdown(TestsBase):'
61 61 def test_markdown2latex(self):
62 62 """markdown2latex test"""
63 63 for index, test in enumerate(self.tests):
64 yield self._try_markdown(markdown2latex, test, self.tokens[index])
64 self._try_markdown(markdown2latex, test, self.tokens[index])
65 65
66 66
67 67 @dec.onlyif_cmds_exist('pandoc')
68 68 def test_markdown2html(self):
69 69 """markdown2html test"""
70 70 for index, test in enumerate(self.tests):
71 yield self._try_markdown(markdown2html, test, self.tokens[index])
71 self._try_markdown(markdown2html, test, self.tokens[index])
72 72
73 73
74 74 @dec.onlyif_cmds_exist('pandoc')
@@ -81,7 +81,7 b' class TestMarkdown(TestsBase):'
81 81 tokens[1] = r'\*\*test'
82 82
83 83 for index, test in enumerate(self.tests):
84 yield self._try_markdown(markdown2rst, test, tokens[index])
84 self._try_markdown(markdown2rst, test, tokens[index])
85 85
86 86
87 87 def _try_markdown(self, method, test, tokens):
@@ -36,7 +36,7 b' class TestStrings(TestsBase):'
36 36 As if the strings were thine, shouldst know of this.
37 37 """
38 38 for length in [30,5,1]:
39 yield self._confirm_wrap_text(test_text, length)
39 self._confirm_wrap_text(test_text, length)
40 40
41 41
42 42 def _confirm_wrap_text(self, text, length):
@@ -73,7 +73,7 b' class TestStrings(TestsBase):'
73 73 ('Hello', 'Hello'),
74 74 ('W$o$rld', 'W$o$rld')]
75 75 for test in tests:
76 yield self._try_strip_dollars(test[0], test[1])
76 self._try_strip_dollars(test[0], test[1])
77 77
78 78
79 79 def _try_strip_dollars(self, test, result):
@@ -89,7 +89,7 b' class TestStrings(TestsBase):'
89 89 ('My files are in `files/`', 'My files are in `files/`'),
90 90 ('<a href="files/test.html">files/test.html</a>', '<a href="test.html">files/test.html</a>')]
91 91 for test in tests:
92 yield self._try_files_prefix(test[0], test[1])
92 self._try_files_prefix(test[0], test[1])
93 93
94 94
95 95 def _try_files_prefix(self, test, result):
@@ -16,12 +16,12 b' Contains base test class for nbconvert'
16 16 import os
17 17 import glob
18 18 import shutil
19 import unittest
19 20
20 21 import IPython
21 22 from IPython.utils.tempdir import TemporaryWorkingDirectory
22 23 from IPython.utils.process import get_output_error_code
23 24 from IPython.testing.tools import get_ipython_cmd
24 from IPython.testing.ipunittest import ParametricTestCase
25 25
26 26 # a trailing space allows for simpler concatenation with the other arguments
27 27 ipy_cmd = get_ipython_cmd(as_string=True) + " "
@@ -31,7 +31,7 b' ipy_cmd = get_ipython_cmd(as_string=True) + " "'
31 31 #-----------------------------------------------------------------------------
32 32
33 33
34 class TestsBase(ParametricTestCase):
34 class TestsBase(unittest.TestCase):
35 35 """Base tests class. Contains useful fuzzy comparison and nbconvert
36 36 functions."""
37 37
@@ -86,7 +86,7 b' class TestsBase(ParametricTestCase):'
86 86
87 87 For example:
88 88 Replace "ii" with "i" in the string "Hiiii" yields "Hii"
89 Another replacement yields "Hi" (the desired output)
89 Another replacement cds "Hi" (the desired output)
90 90
91 91 Parameters:
92 92 -----------
General Comments 0
You need to be logged in to leave comments. Login now