diff options
author | JensDiemer <git@jensdiemer.de> | 2020-01-18 19:32:48 +0100 |
---|---|---|
committer | JensDiemer <git@jensdiemer.de> | 2020-01-18 19:32:48 +0100 |
commit | fffd319fa0841bc6d72e82f808b693e03443eff4 (patch) | |
tree | d216a7d816e25f27a76b0d40526be2180d029a8d /creole/tests | |
parent | f5bc0d6b695403c5bd3905f85b34f28548513580 (diff) | |
download | creole-fffd319fa0841bc6d72e82f808b693e03443eff4.tar.gz |
remove __future__ imports
Diffstat (limited to 'creole/tests')
-rw-r--r-- | creole/tests/test_cli.py | 2 | ||||
-rw-r--r-- | creole/tests/test_creole2html.py | 2 | ||||
-rw-r--r-- | creole/tests/test_cross_compare_all.py | 2 | ||||
-rw-r--r-- | creole/tests/test_cross_compare_creole.py | 38 | ||||
-rw-r--r-- | creole/tests/test_cross_compare_rest.py | 2 | ||||
-rw-r--r-- | creole/tests/test_cross_compare_textile.py | 2 | ||||
-rw-r--r-- | creole/tests/test_html2creole.py | 18 | ||||
-rw-r--r-- | creole/tests/test_html2rest.py | 48 | ||||
-rw-r--r-- | creole/tests/test_html2textile.py | 12 | ||||
-rw-r--r-- | creole/tests/test_macros.py | 12 | ||||
-rw-r--r-- | creole/tests/test_rest2html.py | 28 | ||||
-rw-r--r-- | creole/tests/test_setup.py | 2 | ||||
-rw-r--r-- | creole/tests/test_setup_utils.py | 2 | ||||
-rw-r--r-- | creole/tests/test_subprocess.py | 2 | ||||
-rw-r--r-- | creole/tests/test_utils.py | 2 | ||||
-rw-r--r-- | creole/tests/utils/base_unittest.py | 4 | ||||
-rw-r--r-- | creole/tests/utils/unittest_subprocess.py | 2 | ||||
-rw-r--r-- | creole/tests/utils/utils.py | 2 |
18 files changed, 90 insertions, 92 deletions
diff --git a/creole/tests/test_cli.py b/creole/tests/test_cli.py index 5be41d5..dc692fc 100644 --- a/creole/tests/test_cli.py +++ b/creole/tests/test_cli.py @@ -9,7 +9,7 @@ :license: GNU GPL v3 or above, see LICENSE for more details. """ -from __future__ import division, absolute_import, print_function, unicode_literals + import subprocess import unittest diff --git a/creole/tests/test_creole2html.py b/creole/tests/test_creole2html.py index 4e21e13..b944ee9 100644 --- a/creole/tests/test_creole2html.py +++ b/creole/tests/test_creole2html.py @@ -16,7 +16,7 @@ :license: GNU GPL v3 or above, see LICENSE for more details. """ -from __future__ import division, absolute_import, print_function, unicode_literals + import sys import unittest diff --git a/creole/tests/test_cross_compare_all.py b/creole/tests/test_cross_compare_all.py index 58259d1..b10f59a 100644 --- a/creole/tests/test_cross_compare_all.py +++ b/creole/tests/test_cross_compare_all.py @@ -18,7 +18,7 @@ :license: GNU GPL v3 or above, see LICENSE for more details. """ -from __future__ import division, absolute_import, print_function, unicode_literals + import unittest diff --git a/creole/tests/test_cross_compare_creole.py b/creole/tests/test_cross_compare_creole.py index 6431fc0..ea48603 100644 --- a/creole/tests/test_cross_compare_creole.py +++ b/creole/tests/test_cross_compare_creole.py @@ -4,7 +4,7 @@ """ cross compare creole unittest ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - + Compare all similarities between: * creole2html * html2creole @@ -16,7 +16,7 @@ :license: GNU GPL v3 or above, see LICENSE for more details. """ -from __future__ import division, absolute_import, print_function, unicode_literals + import unittest @@ -33,13 +33,13 @@ class CrossCompareCreoleTests(BaseCreoleTest): **//bold italics//** //**bold italics**// //This is **also** good.// - + Creole 1.0 optional: This is ##monospace## text. This is ^^superscripted^^ text. This is ,,subscripted,, text. This is __underlined__ text. - + own additions: This is --small-- and this ~~strikeout~~ ;) """, @@ -48,13 +48,13 @@ class CrossCompareCreoleTests(BaseCreoleTest): <strong><i>bold italics</i></strong><br /> <i><strong>bold italics</strong></i><br /> <i>This is <strong>also</strong> good.</i></p> - + <p>Creole 1.0 optional:<br /> This is <tt>monospace</tt> text.<br /> This is <sup>superscripted</sup> text.<br /> This is <sub>subscripted</sub> text.<br /> This is <u>underlined</u> text.</p> - + <p>own additions:<br /> This is <small>small</small> and this <del>strikeout</del> ;)</p> """ @@ -132,7 +132,7 @@ class CrossCompareCreoleTests(BaseCreoleTest): self.cross_compare_creole( creole_string=r""" === Closing braces in nowiki: - + {{{ if (x != NULL) { for (i = 0; i < size; i++) { @@ -143,7 +143,7 @@ class CrossCompareCreoleTests(BaseCreoleTest): """, html_string=""" <h3>Closing braces in nowiki:</h3> - + <pre> if (x != NULL) { for (i = 0; i < size; i++) { @@ -156,14 +156,14 @@ class CrossCompareCreoleTests(BaseCreoleTest): def test_pre2(self): self.cross_compare_creole(r""" 111 - + {{{ //This// does **not** get [[formatted]] }}} 222 one - + {{{ foo @@ -172,14 +172,14 @@ class CrossCompareCreoleTests(BaseCreoleTest): two """, """ <p>111</p> - + <pre> //This// does **not** get [[formatted]] </pre> <p>222</p> - + <p>one</p> - + <pre> foo @@ -191,7 +191,7 @@ class CrossCompareCreoleTests(BaseCreoleTest): def test_pre(self): self.cross_compare_creole(r""" start - + {{{ * no list <html escaped> @@ -199,7 +199,7 @@ class CrossCompareCreoleTests(BaseCreoleTest): end """, """ <p>start</p> - + <pre> * no list <html escaped> @@ -219,16 +219,16 @@ class CrossCompareCreoleTests(BaseCreoleTest): self.cross_compare_creole( creole_string=r""" = Headline - + === **not** //parsed// - + No == headline == or? """, html_string=""" <h1>Headline</h1> - + <h3>**not** //parsed//</h3> - + <p>No == headline == or?</p> """ ) diff --git a/creole/tests/test_cross_compare_rest.py b/creole/tests/test_cross_compare_rest.py index c40e924..454d6e5 100644 --- a/creole/tests/test_cross_compare_rest.py +++ b/creole/tests/test_cross_compare_rest.py @@ -13,7 +13,7 @@ :license: GNU GPL v3 or above, see LICENSE for more details. """ -from __future__ import division, absolute_import, print_function, unicode_literals + import unittest diff --git a/creole/tests/test_cross_compare_textile.py b/creole/tests/test_cross_compare_textile.py index 2a0681a..fbbd871 100644 --- a/creole/tests/test_cross_compare_textile.py +++ b/creole/tests/test_cross_compare_textile.py @@ -16,7 +16,7 @@ :license: GNU GPL v3 or above, see LICENSE for more details. """ -from __future__ import division, absolute_import, print_function, unicode_literals + import unittest diff --git a/creole/tests/test_html2creole.py b/creole/tests/test_html2creole.py index 58a20ef..df7c951 100644 --- a/creole/tests/test_html2creole.py +++ b/creole/tests/test_html2creole.py @@ -5,15 +5,15 @@ """ html2creole tests ~~~~~~~~~~~~~~~~~ - + special html to creole convert tests, witch can't tests in "cross compare" - + :copyleft: 2008-2011 by python-creole team, see AUTHORS for more details. :license: GNU GPL v3 or above, see LICENSE for more details. """ -from __future__ import division, absolute_import, print_function, unicode_literals + import unittest @@ -136,7 +136,7 @@ class TestHtml2CreoleMarkup(BaseCreoleTest): ) def test_transparent_unknown_nodes2(self): - """ + """ HTMLParser has problems with <script> tags. See: http://bugs.python.org/issue670664 """ @@ -163,7 +163,7 @@ class TestHtml2CreoleMarkup(BaseCreoleTest): """, unknown_emit=transparent_unknown_nodes ) - #-------------------------------------------------------------------------- + #-------------------------------------------------------------------------- def test_entities(self): """ @@ -224,7 +224,7 @@ class TestHtml2CreoleMarkup(BaseCreoleTest): def test_tbody_table(self): self.assert_html2creole(r""" Ignore 'tbody' tag in tables: - + |= Headline 1 |= Headline 2 | | cell one | cell two | end @@ -327,7 +327,7 @@ class TestHtml2CreoleMarkup(BaseCreoleTest): """ self.assert_html2creole(r""" **foo** - + * one """, """ <b>foo</b><ul><li>one</li></ul> @@ -409,9 +409,9 @@ class TestHtml2CreoleMarkup(BaseCreoleTest): def test_horizontal_rule(self): self.assert_html2creole(r""" one - + ---- - + two """, """ <p>one</p> diff --git a/creole/tests/test_html2rest.py b/creole/tests/test_html2rest.py index 9056d54..2d391cb 100644 --- a/creole/tests/test_html2rest.py +++ b/creole/tests/test_html2rest.py @@ -4,7 +4,7 @@ """ html2rest unittest ~~~~~~~~~~~~~~~~~~~~~ - + Unittests for special cases which only works in the html2rest way. Note: This only works fine if there is no problematic whitespace handling. @@ -13,7 +13,7 @@ :license: GNU GPL v3 or above, see LICENSE for more details. """ -from __future__ import division, absolute_import, print_function, unicode_literals + import unittest @@ -29,7 +29,7 @@ class ReStTests(BaseCreoleTest): self.assert_html2rest( rest_string=""" first block, line 1 and line 2 - + second block, line 1 and line 2 """, html_string=""" @@ -75,7 +75,7 @@ class ReStTests(BaseCreoleTest): self.assert_html2rest( rest_string=""" :: - + >>> from creole import creole2html >>> creole2html("This is **creole //markup//**") '<p>This is <strong>creole <i>markup</i></strong></p> @@ -117,21 +117,21 @@ class ReStTests(BaseCreoleTest): self.assert_html2rest( rest_string=""" A nested bullet lists: - + * item 1 without p-tag - + * A **`subitem 1.1 </1.1/url/>`_ link** here. - + * subsubitem 1.1.1 - + * subsubitem 1.1.2 - + * subitem 1.2 - + * item 2 without p-tag - + * subitem 2.1 - + Text under list. """, html_string=""" @@ -195,16 +195,16 @@ class ReStTests(BaseCreoleTest): </table> """ ) - + def test_duplicate_substitution1(self): self.assertRaises(Html2restException, self.assert_html2rest, rest_string=""" +-----------------------------+ | this is `same`_ first time. | +-----------------------------+ - + .. _same: /first/ - + the `same </other/>`_ link? """, html_string=""" @@ -216,7 +216,7 @@ class ReStTests(BaseCreoleTest): """, # debug=True ) - + def test_duplicate_link_substitution(self): self.assertRaises(Html2restException, self.assert_html2rest, # self.cross_compare( @@ -224,9 +224,9 @@ class ReStTests(BaseCreoleTest): +-----------------------------+ | this is `same`_ first time. | +-----------------------------+ - + .. _same: /first/ - + the `same </other/>`_ link? """, html_string=""" @@ -245,7 +245,7 @@ class ReStTests(BaseCreoleTest): rest_string=""" a |image|... and a other |image|! - + .. |image| image:: /image.png .. |image| image:: /other.png """, @@ -266,13 +266,13 @@ class ReStTests(BaseCreoleTest): # rest_string=""" # 111 <<pre>><x><</pre>>foo<<pre>></x><</pre>> 222 # 333<<pre>><x foo1="bar1"><</pre>>foobar<<pre>></x><</pre>>444 -# +# # 555<<pre>><x /><</pre>>666 # """, # html_string=""" # <p>111 <x>foo</x> 222<br /> # 333<x foo1="bar1">foobar</x>444</p> -# +# # <p>555<x />666</p> # """, # emitter_kwargs={"unknown_emit":preformat_unknown_nodes} @@ -281,7 +281,7 @@ class ReStTests(BaseCreoleTest): # def test_transparent_unknown_nodes(self): # """ # transparent_unknown_nodes is the default unknown_emit: -# +# # Remove all unknown html tags and show only # their child nodes' content. # """ @@ -289,13 +289,13 @@ class ReStTests(BaseCreoleTest): # rest_string=""" # 111 <<pre>><x><</pre>>foo<<pre>></x><</pre>> 222 # 333<<pre>><x foo1="bar1"><</pre>>foobar<<pre>></x><</pre>>444 -# +# # 555<<pre>><x /><</pre>>666 # """, # html_string=""" # <p>111 <x>foo</x> 222<br /> # 333<x foo1="bar1">foobar</x>444</p> -# +# # <p>555<x />666</p> # """, # ) diff --git a/creole/tests/test_html2textile.py b/creole/tests/test_html2textile.py index f02fced..b26b3e9 100644 --- a/creole/tests/test_html2textile.py +++ b/creole/tests/test_html2textile.py @@ -4,7 +4,7 @@ """ html2textile unittest ~~~~~~~~~~~~~~~~~~~~~ - + Unittests for special cases which only works in the html2textile way. Note: This only works fine if there is no problematic whitespace handling. @@ -13,7 +13,7 @@ :license: GNU GPL v3 or above, see LICENSE for more details. """ -from __future__ import division, absolute_import, print_function, unicode_literals + import unittest @@ -46,13 +46,13 @@ class TextileTests(BaseCreoleTest): textile_string=""" 111 <<pre>><x><</pre>>foo<<pre>></x><</pre>> 222 333<<pre>><x foo1="bar1"><</pre>>foobar<<pre>></x><</pre>>444 - + 555<<pre>><x /><</pre>>666 """, html_string=""" <p>111 <x>foo</x> 222<br /> 333<x foo1="bar1">foobar</x>444</p> - + <p>555<x />666</p> """, emitter_kwargs={"unknown_emit":preformat_unknown_nodes} @@ -61,7 +61,7 @@ class TextileTests(BaseCreoleTest): def test_transparent_unknown_nodes(self): """ transparent_unknown_nodes is the default unknown_emit: - + Remove all unknown html tags and show only their child nodes' content. """ @@ -75,7 +75,7 @@ class TextileTests(BaseCreoleTest): html_string=""" <p>111 <x>foo</x> 222<br /> 333<x foo1="bar1">foobar</x>444</p> - + <p>555<x />666</p> """, ) diff --git a/creole/tests/test_macros.py b/creole/tests/test_macros.py index a5194f9..2a036be 100644 --- a/creole/tests/test_macros.py +++ b/creole/tests/test_macros.py @@ -4,15 +4,15 @@ """ Creole unittest macros ~~~~~~~~~~~~~~~~~~~~~~ - + Note: all mecro functions must return unicode! - + :copyleft: 2008-2011 by python-creole team, see AUTHORS for more details. :license: GNU GPL v3 or above, see LICENSE for more details. """ -from __future__ import division, absolute_import, print_function, unicode_literals + import json @@ -20,10 +20,10 @@ def unittest_macro1(**kwargs): """ >>> unittest_macro1(foo="bar") '[test macro1 - kwargs: foo="bar"]' - + >>> unittest_macro1() '[test macro1 - kwargs: ]' - + >>> unittest_macro1(a=1,b=2) '[test macro1 - kwargs: a=1,b=2]' """ @@ -40,4 +40,4 @@ def unittest_macro2(char, text): if __name__ == '__main__': import doctest - print(doctest.testmod())
\ No newline at end of file + print(doctest.testmod()) diff --git a/creole/tests/test_rest2html.py b/creole/tests/test_rest2html.py index ea23be8..23261d9 100644 --- a/creole/tests/test_rest2html.py +++ b/creole/tests/test_rest2html.py @@ -4,14 +4,14 @@ """ rest2html unittest ~~~~~~~~~~~~~~~~~~ - + Unittests for rest2html, see: creole/rest2html/clean_writer.py :copyleft: 2011-2012 by python-creole team, see AUTHORS for more details. :license: GNU GPL v3 or above, see LICENSE for more details. """ -from __future__ import division, absolute_import, print_function, unicode_literals + import tempfile import unittest @@ -24,7 +24,7 @@ class ReSt2HtmlTests(BaseCreoleTest): self.assert_rest2html(""" :homepage: http://code.google.com/p/python-creole/ - + :sourcecode: http://github.com/jedie/python-creole """, """ @@ -61,17 +61,17 @@ class ReSt2HtmlTests(BaseCreoleTest): def test_clean_list(self): self.assert_rest2html(""" * item 1 - + * item 1.1 - + * item 1.2 - + * item 2 - + numbered list: - + #. item A - + #. item B """, """ <ul> @@ -96,7 +96,7 @@ class ReSt2HtmlTests(BaseCreoleTest): ====== head 1 ====== - + ------ head 2 ------ @@ -108,7 +108,7 @@ class ReSt2HtmlTests(BaseCreoleTest): def test_include_disabled_by_default(self): self.assert_rest2html(""" Include should be disabled by default. - + .. include:: doesntexist.txt """, """ <p>Include should be disabled by default.</p> @@ -122,7 +122,7 @@ class ReSt2HtmlTests(BaseCreoleTest): temp.flush() self.assert_rest2html(""" Enable include and test it. - + .. include:: %s """ % temp.name, """ <p>Enable include and test it.</p> @@ -132,7 +132,7 @@ class ReSt2HtmlTests(BaseCreoleTest): def test_raw_disabled_by_default(self): self.assert_rest2html(""" Raw directive should be disabled by default. - + .. raw:: html <hr width=50 size=10> @@ -143,7 +143,7 @@ class ReSt2HtmlTests(BaseCreoleTest): def test_raw_enabled(self): self.assert_rest2html(""" Now RAW is enabled. - + .. raw:: html <hr width=50 size=10> diff --git a/creole/tests/test_setup.py b/creole/tests/test_setup.py index 52524dc..1019c89 100644 --- a/creole/tests/test_setup.py +++ b/creole/tests/test_setup.py @@ -9,7 +9,7 @@ :license: GNU GPL v3 or above, see LICENSE for more details. """ -from __future__ import division, absolute_import, print_function, unicode_literals + import unittest import sys diff --git a/creole/tests/test_setup_utils.py b/creole/tests/test_setup_utils.py index f7b2975..3025543 100644 --- a/creole/tests/test_setup_utils.py +++ b/creole/tests/test_setup_utils.py @@ -11,7 +11,7 @@ :license: GNU GPL v3 or above, see LICENSE for more details. """ -from __future__ import division, absolute_import, print_function, unicode_literals + import unittest import os diff --git a/creole/tests/test_subprocess.py b/creole/tests/test_subprocess.py index 6babded..48fcd1f 100644 --- a/creole/tests/test_subprocess.py +++ b/creole/tests/test_subprocess.py @@ -8,7 +8,7 @@ :license: GNU GPL v3 or above, see LICENSE for more details. """ -from __future__ import division, absolute_import, print_function, unicode_literals + import unittest import sys diff --git a/creole/tests/test_utils.py b/creole/tests/test_utils.py index 2ad8d07..d1c2939 100644 --- a/creole/tests/test_utils.py +++ b/creole/tests/test_utils.py @@ -9,7 +9,7 @@ :license: GNU GPL v3 or above, see LICENSE for more details. """ -from __future__ import division, absolute_import, print_function, unicode_literals + import unittest diff --git a/creole/tests/utils/base_unittest.py b/creole/tests/utils/base_unittest.py index f9002fa..6811006 100644 --- a/creole/tests/utils/base_unittest.py +++ b/creole/tests/utils/base_unittest.py @@ -11,7 +11,7 @@ :license: GNU GPL v3 or above, see LICENSE for more details. """ -from __future__ import division, absolute_import, print_function, unicode_literals + import re import warnings @@ -149,7 +149,7 @@ class BaseCreoleTest(MarkupTest): self.assertEqual(out_string, html_string, msg="creole2html") def assert_html2creole2(self, creole, html, - debug=False, + debug=False, unknown_emit=None, strict=False, ): diff --git a/creole/tests/utils/unittest_subprocess.py b/creole/tests/utils/unittest_subprocess.py index bca3779..96f271b 100644 --- a/creole/tests/utils/unittest_subprocess.py +++ b/creole/tests/utils/unittest_subprocess.py @@ -8,8 +8,6 @@ :license: GNU GPL v3 or above, see LICENSE for more details. """ -from __future__ import print_function, unicode_literals - import json import os import subprocess diff --git a/creole/tests/utils/utils.py b/creole/tests/utils/utils.py index 5e2b24a..fd94da7 100644 --- a/creole/tests/utils/utils.py +++ b/creole/tests/utils/utils.py @@ -11,7 +11,7 @@ :license: GNU GPL v3 or above, see LICENSE for more details. """ -from __future__ import division, absolute_import, print_function, unicode_literals + import difflib import textwrap |