diff --git a/IPython/nbconvert/filters/tests/test_ansi.py b/IPython/nbconvert/filters/tests/test_ansi.py index d8c0d48..29446d7 100644 --- a/IPython/nbconvert/filters/tests/test_ansi.py +++ b/IPython/nbconvert/filters/tests/test_ansi.py @@ -14,6 +14,7 @@ Module with tests for ansi filters # Imports #----------------------------------------------------------------------------- +from IPython.testing import decorators as dec from IPython.utils.coloransi import TermColors from ...tests.base import TestsBase @@ -27,7 +28,7 @@ from ..ansi import strip_ansi, ansi2html, ansi2latex class TestAnsi(TestsBase): """Contains test functions for ansi.py""" - + @dec.parametric def test_strip_ansi(self): """strip_ansi test""" correct_outputs = { @@ -47,6 +48,7 @@ class TestAnsi(TestsBase): self.assert_equal(outval, strip_ansi(inval)) + @dec.parametric def test_ansi2html(self): """ansi2html test""" correct_outputs = { @@ -66,6 +68,7 @@ class TestAnsi(TestsBase): self.fuzzy_compare(outval, ansi2html(inval)) + @dec.parametric def test_ansi2latex(self): """ansi2latex test""" correct_outputs = { diff --git a/IPython/nbconvert/filters/tests/test_highlight.py b/IPython/nbconvert/filters/tests/test_highlight.py index fb91ed2..6f9b601 100644 --- a/IPython/nbconvert/filters/tests/test_highlight.py +++ b/IPython/nbconvert/filters/tests/test_highlight.py @@ -14,6 +14,7 @@ Module with tests for Highlight # Imports #----------------------------------------------------------------------------- +from IPython.testing import decorators as dec from ...tests.base import TestsBase from ..highlight import highlight2html, highlight2latex @@ -47,12 +48,14 @@ class TestHighlight(TestsBase): ['pylab', 'plot']] + @dec.parametric def test_highlight2html(self): """highlight2html test""" for index, test in enumerate(self.tests): yield self._try_highlight, highlight2html, test, self.tokens[index] + @dec.parametric def test_highlight2latex(self): """highlight2latex test""" for index, test in enumerate(self.tests): diff --git a/IPython/nbconvert/filters/tests/test_latex.py b/IPython/nbconvert/filters/tests/test_latex.py index 69d37a0..4cc5921 100644 --- a/IPython/nbconvert/filters/tests/test_latex.py +++ b/IPython/nbconvert/filters/tests/test_latex.py @@ -14,6 +14,7 @@ Module with tests for Latex # Imports #----------------------------------------------------------------------------- +from IPython.testing import decorators as dec from ...tests.base import TestsBase from ..latex import escape_latex, strip_math_space @@ -26,6 +27,7 @@ from ..latex import escape_latex, strip_math_space class TestLatex(TestsBase): + @dec.parametric def test_escape_latex(self): """escape_latex test""" tests = [ @@ -43,6 +45,7 @@ class TestLatex(TestsBase): self.assert_equal(escape_latex(test), result) + @dec.parametric def test_strip_math_space(self): """strip_math_space test""" tests = [ diff --git a/IPython/nbconvert/filters/tests/test_markdown.py b/IPython/nbconvert/filters/tests/test_markdown.py index d7630e2..235c2f0 100644 --- a/IPython/nbconvert/filters/tests/test_markdown.py +++ b/IPython/nbconvert/filters/tests/test_markdown.py @@ -17,8 +17,8 @@ Module with tests for Markdown from copy import copy -from IPython.testing.decorators import onlyif_cmds_exist from IPython.utils.py3compat import string_types +from IPython.testing import decorators as dec from ...tests.base import TestsBase from ..markdown import markdown2latex, markdown2html, markdown2rst @@ -57,21 +57,24 @@ class TestMarkdown(TestsBase): ('test', 'https://google.com/')] - @onlyif_cmds_exist('pandoc') + @dec.onlyif_cmds_exist('pandoc') + @dec.parametric def test_markdown2latex(self): """markdown2latex test""" for index, test in enumerate(self.tests): yield self._try_markdown, markdown2latex, test, self.tokens[index] - @onlyif_cmds_exist('pandoc') + @dec.onlyif_cmds_exist('pandoc') + @dec.parametric def test_markdown2html(self): """markdown2html test""" for index, test in enumerate(self.tests): yield self._try_markdown, markdown2html, test, self.tokens[index] - @onlyif_cmds_exist('pandoc') + @dec.onlyif_cmds_exist('pandoc') + @dec.parametric def test_markdown2rst(self): """markdown2rst test""" diff --git a/IPython/nbconvert/filters/tests/test_strings.py b/IPython/nbconvert/filters/tests/test_strings.py index f97fefa..1dda79e 100644 --- a/IPython/nbconvert/filters/tests/test_strings.py +++ b/IPython/nbconvert/filters/tests/test_strings.py @@ -14,6 +14,7 @@ Module with tests for Strings # Imports #----------------------------------------------------------------------------- +from IPython.testing import decorators as dec from ...tests.base import TestsBase from ..strings import (wrap_text, html2text, add_anchor, strip_dollars, strip_files_prefix, get_lines, comment_lines, ipython2python) @@ -25,6 +26,7 @@ from ..strings import (wrap_text, html2text, add_anchor, strip_dollars, class TestStrings(TestsBase): + @dec.parametric def test_wrap_text(self): """wrap_text test""" test_text = """ @@ -35,10 +37,12 @@ class TestStrings(TestsBase): for length in [30,5,1]: yield self._confirm_wrap_text, test_text, length + def _confirm_wrap_text(self, text, length): for line in wrap_text(text, length).split('\n'): assert len(line) <= length + def test_html2text(self): """html2text test""" #TODO: More tests @@ -56,6 +60,7 @@ class TestStrings(TestsBase): assert '' in results + @dec.parametric def test_strip_dollars(self): """strip_dollars test""" tests = [ @@ -75,6 +80,7 @@ class TestStrings(TestsBase): self.assert_equal(strip_dollars(test), result) + @dec.parametric def test_strip_files_prefix(self): """strip_files_prefix test""" tests = [