6b24f153d7
All of those patches are picked from upstream. xbps-src check python3-docutils works fine now!
1699 lines
58 KiB
Diff
1699 lines
58 KiB
Diff
From 2384d685b2b38e30a0dbb60594c190f36ad7e3a7 Mon Sep 17 00:00:00 2001
|
|
From: Stephen Finucane <stephen@that.guru>
|
|
Date: Tue, 19 Nov 2019 23:57:43 +0700
|
|
Subject: [PATCH 09/26] py3: Use 'absolute_import' future
|
|
|
|
This mostly applies to tests.
|
|
|
|
Signed-off-by: Stephen Finucane <stephen@that.guru>
|
|
|
|
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8356 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
Signed-off-by: Doan Tran Cong Danh <congdanhqx@gmail.com>
|
|
---
|
|
docutils/writers/odf_odt/__init__.py | 3 ++-
|
|
test/test_parsers/test_get_parser_class.py | 3 ++-
|
|
test/test_parsers/test_rst/test_SimpleTableParser.py | 3 ++-
|
|
test/test_parsers/test_rst/test_TableParser.py | 3 ++-
|
|
test/test_parsers/test_rst/test_block_quotes.py | 3 ++-
|
|
test/test_parsers/test_rst/test_bullet_lists.py | 3 ++-
|
|
.../test_rst/test_character_level_inline_markup.py | 3 ++-
|
|
test/test_parsers/test_rst/test_citations.py | 3 ++-
|
|
test/test_parsers/test_rst/test_comments.py | 3 ++-
|
|
test/test_parsers/test_rst/test_definition_lists.py | 3 ++-
|
|
.../test_rst/test_directives/test_admonitions.py | 3 ++-
|
|
.../test_rst/test_directives/test_block_quotes.py | 3 ++-
|
|
test/test_parsers/test_rst/test_directives/test_class.py | 3 ++-
|
|
test/test_parsers/test_rst/test_directives/test_code.py | 3 ++-
|
|
.../test_rst/test_directives/test_code_long.py | 3 ++-
|
|
.../test_rst/test_directives/test_code_none.py | 3 ++-
|
|
.../test_rst/test_directives/test_compound.py | 3 ++-
|
|
.../test_rst/test_directives/test_container.py | 3 ++-
|
|
.../test_rst/test_directives/test_contents.py | 3 ++-
|
|
test/test_parsers/test_rst/test_directives/test_date.py | 3 ++-
|
|
.../test_rst/test_directives/test_decorations.py | 4 +++-
|
|
.../test_rst/test_directives/test_default_role.py | 3 ++-
|
|
.../test_parsers/test_rst/test_directives/test_figures.py | 4 +++-
|
|
test/test_parsers/test_rst/test_directives/test_images.py | 4 +++-
|
|
.../test_parsers/test_rst/test_directives/test_include.py | 3 ++-
|
|
.../test_rst/test_directives/test_line_blocks.py | 4 +++-
|
|
test/test_parsers/test_rst/test_directives/test_math.py | 4 +++-
|
|
test/test_parsers/test_rst/test_directives/test_meta.py | 4 +++-
|
|
.../test_rst/test_directives/test_parsed_literals.py | 4 +++-
|
|
test/test_parsers/test_rst/test_directives/test_raw.py | 5 ++++-
|
|
.../test_parsers/test_rst/test_directives/test_replace.py | 3 ++-
|
|
.../test_rst/test_directives/test_replace_fr.py | 3 ++-
|
|
test/test_parsers/test_rst/test_directives/test_role.py | 3 ++-
|
|
.../test_parsers/test_rst/test_directives/test_rubrics.py | 3 ++-
|
|
.../test_parsers/test_rst/test_directives/test_sectnum.py | 4 +++-
|
|
.../test_rst/test_directives/test_sidebars.py | 4 +++-
|
|
test/test_parsers/test_rst/test_directives/test_tables.py | 4 +++-
|
|
.../test_rst/test_directives/test_target_notes.py | 4 +++-
|
|
.../test_rst/test_directives/test_test_directives.py | 4 +++-
|
|
test/test_parsers/test_rst/test_directives/test_title.py | 4 +++-
|
|
test/test_parsers/test_rst/test_directives/test_topics.py | 4 +++-
|
|
.../test_parsers/test_rst/test_directives/test_unicode.py | 3 ++-
|
|
.../test_parsers/test_rst/test_directives/test_unknown.py | 4 +++-
|
|
test/test_parsers/test_rst/test_doctest_blocks.py | 4 +++-
|
|
test/test_parsers/test_rst/test_east_asian_text.py | 5 ++++-
|
|
test/test_parsers/test_rst/test_enumerated_lists.py | 4 +++-
|
|
test/test_parsers/test_rst/test_field_lists.py | 4 +++-
|
|
test/test_parsers/test_rst/test_footnotes.py | 4 +++-
|
|
test/test_parsers/test_rst/test_inline_markup.py | 4 +++-
|
|
test/test_parsers/test_rst/test_interpreted.py | 4 +++-
|
|
test/test_parsers/test_rst/test_interpreted_fr.py | 4 +++-
|
|
test/test_parsers/test_rst/test_line_blocks.py | 4 +++-
|
|
test/test_parsers/test_rst/test_literal_blocks.py | 4 +++-
|
|
test/test_parsers/test_rst/test_option_lists.py | 4 +++-
|
|
test/test_parsers/test_rst/test_outdenting.py | 4 +++-
|
|
test/test_parsers/test_rst/test_paragraphs.py | 4 +++-
|
|
test/test_parsers/test_rst/test_section_headers.py | 8 ++++++--
|
|
test/test_parsers/test_rst/test_substitutions.py | 4 +++-
|
|
test/test_parsers/test_rst/test_tables.py | 5 ++++-
|
|
test/test_parsers/test_rst/test_targets.py | 4 +++-
|
|
test/test_parsers/test_rst/test_transitions.py | 4 +++-
|
|
test/test_readers/test_get_reader_class.py | 5 +++--
|
|
test/test_readers/test_pep/test_inline_markup.py | 3 ++-
|
|
test/test_readers/test_pep/test_rfc2822.py | 4 +++-
|
|
test/test_transforms/test___init__.py | 6 ++++--
|
|
test/test_transforms/test_class.py | 3 ++-
|
|
test/test_transforms/test_contents.py | 3 ++-
|
|
test/test_transforms/test_docinfo.py | 3 ++-
|
|
test/test_transforms/test_doctitle.py | 4 +++-
|
|
test/test_transforms/test_expose_internals.py | 4 +++-
|
|
test/test_transforms/test_filter.py | 3 ++-
|
|
test/test_transforms/test_footnotes.py | 3 ++-
|
|
test/test_transforms/test_hyperlinks.py | 4 ++--
|
|
test/test_transforms/test_messages.py | 3 ++-
|
|
test/test_transforms/test_peps.py | 3 ++-
|
|
test/test_transforms/test_sectnum.py | 3 ++-
|
|
test/test_transforms/test_smartquotes.py | 5 +++--
|
|
test/test_transforms/test_strip_comments.py | 3 ++-
|
|
test/test_transforms/test_strip_elements_with_class.py | 3 ++-
|
|
test/test_transforms/test_substitutions.py | 3 ++-
|
|
test/test_transforms/test_target_notes.py | 3 ++-
|
|
test/test_transforms/test_transitions.py | 4 +++-
|
|
test/test_transforms/test_writer_aux.py | 3 ++-
|
|
test/test_writers/test_docutils_xml.py | 3 ++-
|
|
test/test_writers/test_get_writer_class.py | 4 +++-
|
|
test/test_writers/test_html4css1_misc.py | 7 +++++--
|
|
test/test_writers/test_html4css1_parts.py | 4 +++-
|
|
test/test_writers/test_html4css1_template.py | 3 ++-
|
|
test/test_writers/test_html5_polyglot_misc.py | 7 +++++--
|
|
test/test_writers/test_html5_polyglot_parts.py | 3 ++-
|
|
test/test_writers/test_latex2e.py | 5 ++++-
|
|
test/test_writers/test_manpage.py | 4 +++-
|
|
test/test_writers/test_null.py | 4 +++-
|
|
test/test_writers/test_odt.py | 3 ++-
|
|
test/test_writers/test_pseudoxml.py | 4 +++-
|
|
test/test_writers/test_s5.py | 3 ++-
|
|
96 files changed, 253 insertions(+), 103 deletions(-)
|
|
|
|
diff --git a/docutils/writers/odf_odt/__init__.py b/docutils/writers/odf_odt/__init__.py
|
|
index 5f62605..c0f43a5 100644
|
|
--- a/docutils/writers/odf_odt/__init__.py
|
|
+++ b/docutils/writers/odf_odt/__init__.py
|
|
@@ -6,6 +6,7 @@
|
|
Open Document Format (ODF) Writer.
|
|
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
__docformat__ = 'reStructuredText'
|
|
|
|
@@ -71,7 +72,7 @@ try:
|
|
from .pygmentsformatter import OdtPygmentsProgFormatter, \
|
|
OdtPygmentsLaTeXFormatter
|
|
else:
|
|
- from pygmentsformatter import OdtPygmentsProgFormatter, \
|
|
+ from .pygmentsformatter import OdtPygmentsProgFormatter, \
|
|
OdtPygmentsLaTeXFormatter
|
|
except (ImportError, SyntaxError):
|
|
pygments = None
|
|
diff --git a/test/test_parsers/test_get_parser_class.py b/test/test_parsers/test_get_parser_class.py
|
|
index 4de05cc..ca809d0 100644
|
|
--- a/test/test_parsers/test_get_parser_class.py
|
|
+++ b/test/test_parsers/test_get_parser_class.py
|
|
@@ -8,8 +8,9 @@
|
|
"""
|
|
test get_parser_class
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
from docutils.parsers import get_parser_class
|
|
|
|
class GetParserClassTestCase(DocutilsTestSupport.StandardTestCase):
|
|
diff --git a/test/test_parsers/test_rst/test_SimpleTableParser.py b/test/test_parsers/test_rst/test_SimpleTableParser.py
|
|
index 864c545..2942e01 100755
|
|
--- a/test/test_parsers/test_rst/test_SimpleTableParser.py
|
|
+++ b/test/test_parsers/test_rst/test_SimpleTableParser.py
|
|
@@ -8,8 +8,9 @@
|
|
"""
|
|
Tests for states.py.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.SimpleTableParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_TableParser.py b/test/test_parsers/test_rst/test_TableParser.py
|
|
index 189ef2a..ecafe8f 100755
|
|
--- a/test/test_parsers/test_rst/test_TableParser.py
|
|
+++ b/test/test_parsers/test_rst/test_TableParser.py
|
|
@@ -8,8 +8,9 @@
|
|
"""
|
|
Tests for states.py.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.GridTableParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_block_quotes.py b/test/test_parsers/test_rst/test_block_quotes.py
|
|
index 171c784..2aee3c6 100755
|
|
--- a/test/test_parsers/test_rst/test_block_quotes.py
|
|
+++ b/test/test_parsers/test_rst/test_block_quotes.py
|
|
@@ -7,8 +7,9 @@
|
|
"""
|
|
Tests for states.py.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_bullet_lists.py b/test/test_parsers/test_rst/test_bullet_lists.py
|
|
index 246cdbd..4fe963d 100755
|
|
--- a/test/test_parsers/test_rst/test_bullet_lists.py
|
|
+++ b/test/test_parsers/test_rst/test_bullet_lists.py
|
|
@@ -7,8 +7,9 @@
|
|
"""
|
|
Tests for states.py.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_character_level_inline_markup.py b/test/test_parsers/test_rst/test_character_level_inline_markup.py
|
|
index b1d1885..6b42ed6 100644
|
|
--- a/test/test_parsers/test_rst/test_character_level_inline_markup.py
|
|
+++ b/test/test_parsers/test_rst/test_character_level_inline_markup.py
|
|
@@ -11,8 +11,9 @@ with the "character-level-inline-markup" setting.
|
|
|
|
Experimental.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite(suite_settings={'character_level_inline_markup': True})
|
|
diff --git a/test/test_parsers/test_rst/test_citations.py b/test/test_parsers/test_rst/test_citations.py
|
|
index 03370a6..ead2b98 100755
|
|
--- a/test/test_parsers/test_rst/test_citations.py
|
|
+++ b/test/test_parsers/test_rst/test_citations.py
|
|
@@ -7,8 +7,9 @@
|
|
"""
|
|
Tests for states.py.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_comments.py b/test/test_parsers/test_rst/test_comments.py
|
|
index 34f62e1..10cca78 100755
|
|
--- a/test/test_parsers/test_rst/test_comments.py
|
|
+++ b/test/test_parsers/test_rst/test_comments.py
|
|
@@ -7,8 +7,9 @@
|
|
"""
|
|
Tests for states.py.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_definition_lists.py b/test/test_parsers/test_rst/test_definition_lists.py
|
|
index 1a80360..40c633c 100755
|
|
--- a/test/test_parsers/test_rst/test_definition_lists.py
|
|
+++ b/test/test_parsers/test_rst/test_definition_lists.py
|
|
@@ -7,8 +7,9 @@
|
|
"""
|
|
Tests for states.py.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_directives/test_admonitions.py b/test/test_parsers/test_rst/test_directives/test_admonitions.py
|
|
index faf5f66..3724131 100755
|
|
--- a/test/test_parsers/test_rst/test_directives/test_admonitions.py
|
|
+++ b/test/test_parsers/test_rst/test_directives/test_admonitions.py
|
|
@@ -7,8 +7,9 @@
|
|
"""
|
|
Tests for admonitions.py directives.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_directives/test_block_quotes.py b/test/test_parsers/test_rst/test_directives/test_block_quotes.py
|
|
index 93bae9e..87a99d7 100755
|
|
--- a/test/test_parsers/test_rst/test_directives/test_block_quotes.py
|
|
+++ b/test/test_parsers/test_rst/test_directives/test_block_quotes.py
|
|
@@ -8,8 +8,9 @@
|
|
Tests for the block quote directives "epigraph", "highlights", and
|
|
"pull-quote".
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_directives/test_class.py b/test/test_parsers/test_rst/test_directives/test_class.py
|
|
index 544946d..d65c8b4 100755
|
|
--- a/test/test_parsers/test_rst/test_directives/test_class.py
|
|
+++ b/test/test_parsers/test_rst/test_directives/test_class.py
|
|
@@ -7,8 +7,9 @@
|
|
"""
|
|
Tests for the 'class' directive.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_directives/test_code.py b/test/test_parsers/test_rst/test_directives/test_code.py
|
|
index 51c1558..bf7ebba 100644
|
|
--- a/test/test_parsers/test_rst/test_directives/test_code.py
|
|
+++ b/test/test_parsers/test_rst/test_directives/test_code.py
|
|
@@ -7,8 +7,9 @@
|
|
"""
|
|
Test the 'code' directive in parsers/rst/directives/body.py.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
from docutils.utils.code_analyzer import with_pygments
|
|
|
|
def suite():
|
|
diff --git a/test/test_parsers/test_rst/test_directives/test_code_long.py b/test/test_parsers/test_rst/test_directives/test_code_long.py
|
|
index 74f16d5..1a55c97 100644
|
|
--- a/test/test_parsers/test_rst/test_directives/test_code_long.py
|
|
+++ b/test/test_parsers/test_rst/test_directives/test_code_long.py
|
|
@@ -7,8 +7,9 @@
|
|
"""
|
|
Test the 'code' directive in body.py with syntax_highlight = 'long'.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
from docutils.utils.code_analyzer import with_pygments
|
|
|
|
def suite():
|
|
diff --git a/test/test_parsers/test_rst/test_directives/test_code_none.py b/test/test_parsers/test_rst/test_directives/test_code_none.py
|
|
index 515772c..23ae3d2 100644
|
|
--- a/test/test_parsers/test_rst/test_directives/test_code_none.py
|
|
+++ b/test/test_parsers/test_rst/test_directives/test_code_none.py
|
|
@@ -7,8 +7,9 @@
|
|
"""
|
|
Test the 'code' directive in body.py with syntax_highlight = 'none'.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite(suite_settings={'syntax_highlight':'none'})
|
|
diff --git a/test/test_parsers/test_rst/test_directives/test_compound.py b/test/test_parsers/test_rst/test_directives/test_compound.py
|
|
index c0ef4b8..6bbab9c 100755
|
|
--- a/test/test_parsers/test_rst/test_directives/test_compound.py
|
|
+++ b/test/test_parsers/test_rst/test_directives/test_compound.py
|
|
@@ -7,8 +7,9 @@
|
|
"""
|
|
Tests for the 'compound' directive from body.py.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_directives/test_container.py b/test/test_parsers/test_rst/test_directives/test_container.py
|
|
index 6b7b022..9ec5afc 100755
|
|
--- a/test/test_parsers/test_rst/test_directives/test_container.py
|
|
+++ b/test/test_parsers/test_rst/test_directives/test_container.py
|
|
@@ -7,8 +7,9 @@
|
|
"""
|
|
Tests for the 'container' directive from body.py.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_directives/test_contents.py b/test/test_parsers/test_rst/test_directives/test_contents.py
|
|
index e1ef47f..a07ddd2 100755
|
|
--- a/test/test_parsers/test_rst/test_directives/test_contents.py
|
|
+++ b/test/test_parsers/test_rst/test_directives/test_contents.py
|
|
@@ -7,8 +7,9 @@
|
|
"""
|
|
Tests for parts.py contents directive.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_directives/test_date.py b/test/test_parsers/test_rst/test_directives/test_date.py
|
|
index 87dc186..1f30128 100755
|
|
--- a/test/test_parsers/test_rst/test_directives/test_date.py
|
|
+++ b/test/test_parsers/test_rst/test_directives/test_date.py
|
|
@@ -7,8 +7,9 @@
|
|
"""
|
|
Tests for the misc.py "date" directive.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
import time
|
|
|
|
from docutils.utils.error_reporting import locale_encoding
|
|
diff --git a/test/test_parsers/test_rst/test_directives/test_decorations.py b/test/test_parsers/test_rst/test_directives/test_decorations.py
|
|
index b66f68d..63be131 100755
|
|
--- a/test/test_parsers/test_rst/test_directives/test_decorations.py
|
|
+++ b/test/test_parsers/test_rst/test_directives/test_decorations.py
|
|
@@ -7,8 +7,10 @@
|
|
"""
|
|
Tests for the "header" & "footer" directives.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
+
|
|
+from . import DocutilsTestSupport
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_directives/test_default_role.py b/test/test_parsers/test_rst/test_directives/test_default_role.py
|
|
index 15b0f56..f81c30b 100755
|
|
--- a/test/test_parsers/test_rst/test_directives/test_default_role.py
|
|
+++ b/test/test_parsers/test_rst/test_directives/test_default_role.py
|
|
@@ -7,8 +7,9 @@
|
|
"""
|
|
Tests for misc.py "default-role" directive.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
|
|
|
|
def suite():
|
|
diff --git a/test/test_parsers/test_rst/test_directives/test_figures.py b/test/test_parsers/test_rst/test_directives/test_figures.py
|
|
index de54190..09ced3f 100755
|
|
--- a/test/test_parsers/test_rst/test_directives/test_figures.py
|
|
+++ b/test/test_parsers/test_rst/test_directives/test_figures.py
|
|
@@ -7,8 +7,10 @@
|
|
"""
|
|
Tests for images.py figure directives.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
+
|
|
+from . import DocutilsTestSupport
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_directives/test_images.py b/test/test_parsers/test_rst/test_directives/test_images.py
|
|
index c52793c..e78caed 100755
|
|
--- a/test/test_parsers/test_rst/test_directives/test_images.py
|
|
+++ b/test/test_parsers/test_rst/test_directives/test_images.py
|
|
@@ -7,11 +7,13 @@
|
|
"""
|
|
Tests for images.py image directives.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
|
|
from docutils.nodes import reprunicode
|
|
|
|
+
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
s.generateTests(totest)
|
|
diff --git a/test/test_parsers/test_rst/test_directives/test_include.py b/test/test_parsers/test_rst/test_directives/test_include.py
|
|
index 6e9dc84..d848262 100755
|
|
--- a/test/test_parsers/test_rst/test_directives/test_include.py
|
|
+++ b/test/test_parsers/test_rst/test_directives/test_include.py
|
|
@@ -7,10 +7,11 @@
|
|
"""
|
|
Tests for misc.py "include" directive.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
import os.path
|
|
import sys
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
from docutils.parsers.rst import states
|
|
from docutils.utils.code_analyzer import with_pygments
|
|
|
|
diff --git a/test/test_parsers/test_rst/test_directives/test_line_blocks.py b/test/test_parsers/test_rst/test_directives/test_line_blocks.py
|
|
index 0fdfaba..d6bf31b 100755
|
|
--- a/test/test_parsers/test_rst/test_directives/test_line_blocks.py
|
|
+++ b/test/test_parsers/test_rst/test_directives/test_line_blocks.py
|
|
@@ -7,8 +7,10 @@
|
|
"""
|
|
Tests for the body.py 'line-block' directive.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
+
|
|
+from . import DocutilsTestSupport
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_directives/test_math.py b/test/test_parsers/test_rst/test_directives/test_math.py
|
|
index e8dfe27..2bac077 100644
|
|
--- a/test/test_parsers/test_rst/test_directives/test_math.py
|
|
+++ b/test/test_parsers/test_rst/test_directives/test_math.py
|
|
@@ -7,8 +7,10 @@
|
|
"""
|
|
Tests for the 'math' directive.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
+
|
|
+from . import DocutilsTestSupport
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_directives/test_meta.py b/test/test_parsers/test_rst/test_directives/test_meta.py
|
|
index bd7906d..8b15dde 100755
|
|
--- a/test/test_parsers/test_rst/test_directives/test_meta.py
|
|
+++ b/test/test_parsers/test_rst/test_directives/test_meta.py
|
|
@@ -7,8 +7,10 @@
|
|
"""
|
|
Tests for html meta directives.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
+
|
|
+from . import DocutilsTestSupport
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_directives/test_parsed_literals.py b/test/test_parsers/test_rst/test_directives/test_parsed_literals.py
|
|
index 6bf2cb1..4ea09e1 100755
|
|
--- a/test/test_parsers/test_rst/test_directives/test_parsed_literals.py
|
|
+++ b/test/test_parsers/test_rst/test_directives/test_parsed_literals.py
|
|
@@ -7,8 +7,10 @@
|
|
"""
|
|
Tests for the body.py 'parsed-literal' directive.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
+
|
|
+from . import DocutilsTestSupport
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_directives/test_raw.py b/test/test_parsers/test_rst/test_directives/test_raw.py
|
|
index f366f92..2da962a 100755
|
|
--- a/test/test_parsers/test_rst/test_directives/test_raw.py
|
|
+++ b/test/test_parsers/test_rst/test_directives/test_raw.py
|
|
@@ -7,10 +7,13 @@
|
|
"""
|
|
Tests for misc.py "raw" directive.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
import os.path
|
|
import sys
|
|
-from __init__ import DocutilsTestSupport
|
|
+
|
|
+from . import DocutilsTestSupport
|
|
+
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_directives/test_replace.py b/test/test_parsers/test_rst/test_directives/test_replace.py
|
|
index d2d3d8a..75e580b 100755
|
|
--- a/test/test_parsers/test_rst/test_directives/test_replace.py
|
|
+++ b/test/test_parsers/test_rst/test_directives/test_replace.py
|
|
@@ -7,8 +7,9 @@
|
|
"""
|
|
Tests for misc.py "replace" directive.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
|
|
|
|
def suite():
|
|
diff --git a/test/test_parsers/test_rst/test_directives/test_replace_fr.py b/test/test_parsers/test_rst/test_directives/test_replace_fr.py
|
|
index 6847c1c..78e4a45 100644
|
|
--- a/test/test_parsers/test_rst/test_directives/test_replace_fr.py
|
|
+++ b/test/test_parsers/test_rst/test_directives/test_replace_fr.py
|
|
@@ -8,8 +8,9 @@
|
|
Tests for misc.py "replace" directive.
|
|
Test in french (not default/fallback language).
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
|
|
|
|
def suite():
|
|
diff --git a/test/test_parsers/test_rst/test_directives/test_role.py b/test/test_parsers/test_rst/test_directives/test_role.py
|
|
index 3f728f0..60d65e6 100755
|
|
--- a/test/test_parsers/test_rst/test_directives/test_role.py
|
|
+++ b/test/test_parsers/test_rst/test_directives/test_role.py
|
|
@@ -7,8 +7,9 @@
|
|
"""
|
|
Tests for misc.py "role" directive.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
|
|
|
|
def suite():
|
|
diff --git a/test/test_parsers/test_rst/test_directives/test_rubrics.py b/test/test_parsers/test_rst/test_directives/test_rubrics.py
|
|
index 70b6b00..52dcd5c 100755
|
|
--- a/test/test_parsers/test_rst/test_directives/test_rubrics.py
|
|
+++ b/test/test_parsers/test_rst/test_directives/test_rubrics.py
|
|
@@ -7,8 +7,9 @@
|
|
"""
|
|
Tests for the "rubric" directive.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_directives/test_sectnum.py b/test/test_parsers/test_rst/test_directives/test_sectnum.py
|
|
index 7ab0486..4119607 100755
|
|
--- a/test/test_parsers/test_rst/test_directives/test_sectnum.py
|
|
+++ b/test/test_parsers/test_rst/test_directives/test_sectnum.py
|
|
@@ -7,8 +7,10 @@
|
|
"""
|
|
Tests for the 'sectnum' directive.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
+
|
|
+from . import DocutilsTestSupport
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_directives/test_sidebars.py b/test/test_parsers/test_rst/test_directives/test_sidebars.py
|
|
index 7c61dac..ef501ce 100755
|
|
--- a/test/test_parsers/test_rst/test_directives/test_sidebars.py
|
|
+++ b/test/test_parsers/test_rst/test_directives/test_sidebars.py
|
|
@@ -7,8 +7,10 @@
|
|
"""
|
|
Tests for the "sidebar" directive.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
+
|
|
+from . import DocutilsTestSupport
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_directives/test_tables.py b/test/test_parsers/test_rst/test_directives/test_tables.py
|
|
index 2c5f832..ee930c8 100755
|
|
--- a/test/test_parsers/test_rst/test_directives/test_tables.py
|
|
+++ b/test/test_parsers/test_rst/test_directives/test_tables.py
|
|
@@ -8,13 +8,15 @@
|
|
Tests for tables.py directives.
|
|
"""
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from __future__ import absolute_import
|
|
|
|
import os, sys
|
|
import csv
|
|
import platform
|
|
from docutils.parsers.rst.directives import tables
|
|
|
|
+from . import DocutilsTestSupport
|
|
+
|
|
|
|
if sys.version_info >= (3, 0):
|
|
unicode = str # noqa
|
|
diff --git a/test/test_parsers/test_rst/test_directives/test_target_notes.py b/test/test_parsers/test_rst/test_directives/test_target_notes.py
|
|
index 37a63f5..167cd8a 100755
|
|
--- a/test/test_parsers/test_rst/test_directives/test_target_notes.py
|
|
+++ b/test/test_parsers/test_rst/test_directives/test_target_notes.py
|
|
@@ -7,8 +7,10 @@
|
|
"""
|
|
Tests for the target-notes directives.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
+
|
|
+from . import DocutilsTestSupport
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_directives/test_test_directives.py b/test/test_parsers/test_rst/test_directives/test_test_directives.py
|
|
index 07e9bd2..65cffed 100755
|
|
--- a/test/test_parsers/test_rst/test_directives/test_test_directives.py
|
|
+++ b/test/test_parsers/test_rst/test_directives/test_test_directives.py
|
|
@@ -7,8 +7,10 @@
|
|
"""
|
|
Tests for misc.py test directives.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
+
|
|
+from . import DocutilsTestSupport
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_directives/test_title.py b/test/test_parsers/test_rst/test_directives/test_title.py
|
|
index 4a7cfd6..c24309c 100755
|
|
--- a/test/test_parsers/test_rst/test_directives/test_title.py
|
|
+++ b/test/test_parsers/test_rst/test_directives/test_title.py
|
|
@@ -7,8 +7,10 @@
|
|
"""
|
|
Tests for the 'title' directive.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
+
|
|
+from . import DocutilsTestSupport
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_directives/test_topics.py b/test/test_parsers/test_rst/test_directives/test_topics.py
|
|
index 9588599..fdd4bc3 100755
|
|
--- a/test/test_parsers/test_rst/test_directives/test_topics.py
|
|
+++ b/test/test_parsers/test_rst/test_directives/test_topics.py
|
|
@@ -7,8 +7,10 @@
|
|
"""
|
|
Tests for the "topic" directive.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
+
|
|
+from . import DocutilsTestSupport
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_directives/test_unicode.py b/test/test_parsers/test_rst/test_directives/test_unicode.py
|
|
index 5cdfd5a..b99b5d0 100755
|
|
--- a/test/test_parsers/test_rst/test_directives/test_unicode.py
|
|
+++ b/test/test_parsers/test_rst/test_directives/test_unicode.py
|
|
@@ -7,10 +7,11 @@
|
|
"""
|
|
Tests for misc.py "unicode" directive.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
import sys
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
|
|
|
|
if sys.version_info >= (3, 0):
|
|
diff --git a/test/test_parsers/test_rst/test_directives/test_unknown.py b/test/test_parsers/test_rst/test_directives/test_unknown.py
|
|
index 69e2c01..98cb6b9 100755
|
|
--- a/test/test_parsers/test_rst/test_directives/test_unknown.py
|
|
+++ b/test/test_parsers/test_rst/test_directives/test_unknown.py
|
|
@@ -7,8 +7,10 @@
|
|
"""
|
|
Tests for unknown directives.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
+
|
|
+from . import DocutilsTestSupport
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_doctest_blocks.py b/test/test_parsers/test_rst/test_doctest_blocks.py
|
|
index 4f367db..d7787d7 100755
|
|
--- a/test/test_parsers/test_rst/test_doctest_blocks.py
|
|
+++ b/test/test_parsers/test_rst/test_doctest_blocks.py
|
|
@@ -7,8 +7,10 @@
|
|
"""
|
|
Tests for states.py.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
+
|
|
+from . import DocutilsTestSupport
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_east_asian_text.py b/test/test_parsers/test_rst/test_east_asian_text.py
|
|
index e29ea82..d819ef8 100755
|
|
--- a/test/test_parsers/test_rst/test_east_asian_text.py
|
|
+++ b/test/test_parsers/test_rst/test_east_asian_text.py
|
|
@@ -8,15 +8,18 @@
|
|
"""
|
|
Tests for East Asian text with double-width characters.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
|
|
import unicodedata
|
|
+
|
|
try:
|
|
east_asian_width = unicodedata.east_asian_width
|
|
except AttributeError:
|
|
east_asian_width = None
|
|
|
|
+
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
s.generateTests(totest)
|
|
diff --git a/test/test_parsers/test_rst/test_enumerated_lists.py b/test/test_parsers/test_rst/test_enumerated_lists.py
|
|
index 09ea238..09bc005 100755
|
|
--- a/test/test_parsers/test_rst/test_enumerated_lists.py
|
|
+++ b/test/test_parsers/test_rst/test_enumerated_lists.py
|
|
@@ -7,8 +7,10 @@
|
|
"""
|
|
Tests for states.py.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
+
|
|
+from . import DocutilsTestSupport
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_field_lists.py b/test/test_parsers/test_rst/test_field_lists.py
|
|
index c51dd7c..34073aa 100755
|
|
--- a/test/test_parsers/test_rst/test_field_lists.py
|
|
+++ b/test/test_parsers/test_rst/test_field_lists.py
|
|
@@ -7,8 +7,10 @@
|
|
"""
|
|
Tests for states.py.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
+
|
|
+from . import DocutilsTestSupport
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_footnotes.py b/test/test_parsers/test_rst/test_footnotes.py
|
|
index fabfaf0..ba157d9 100755
|
|
--- a/test/test_parsers/test_rst/test_footnotes.py
|
|
+++ b/test/test_parsers/test_rst/test_footnotes.py
|
|
@@ -7,8 +7,10 @@
|
|
"""
|
|
Tests for states.py.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
+
|
|
+from . import DocutilsTestSupport
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_inline_markup.py b/test/test_parsers/test_rst/test_inline_markup.py
|
|
index d6fdac7..1762880 100755
|
|
--- a/test/test_parsers/test_rst/test_inline_markup.py
|
|
+++ b/test/test_parsers/test_rst/test_inline_markup.py
|
|
@@ -9,8 +9,10 @@
|
|
Tests for inline markup in docutils/parsers/rst/states.py.
|
|
Interpreted text tests are in a separate module, test_interpreted.py.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
+
|
|
+from . import DocutilsTestSupport
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_interpreted.py b/test/test_parsers/test_rst/test_interpreted.py
|
|
index 6dce09c..48b4ebe 100755
|
|
--- a/test/test_parsers/test_rst/test_interpreted.py
|
|
+++ b/test/test_parsers/test_rst/test_interpreted.py
|
|
@@ -7,10 +7,12 @@
|
|
"""
|
|
Tests for interpreted text in docutils/parsers/rst/states.py.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
from docutils.utils.code_analyzer import with_pygments
|
|
|
|
+
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
if not with_pygments:
|
|
diff --git a/test/test_parsers/test_rst/test_interpreted_fr.py b/test/test_parsers/test_rst/test_interpreted_fr.py
|
|
index a0e1d78..046ab15 100644
|
|
--- a/test/test_parsers/test_rst/test_interpreted_fr.py
|
|
+++ b/test/test_parsers/test_rst/test_interpreted_fr.py
|
|
@@ -8,8 +8,10 @@
|
|
Tests for interpreted text in docutils/parsers/rst/states.py.
|
|
Test not default/fallback language french.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
+
|
|
+from . import DocutilsTestSupport
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite(suite_settings={'language_code':'fr'})
|
|
diff --git a/test/test_parsers/test_rst/test_line_blocks.py b/test/test_parsers/test_rst/test_line_blocks.py
|
|
index d0a2776..3ab1764 100755
|
|
--- a/test/test_parsers/test_rst/test_line_blocks.py
|
|
+++ b/test/test_parsers/test_rst/test_line_blocks.py
|
|
@@ -7,8 +7,10 @@
|
|
"""
|
|
Tests for states.py.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
+
|
|
+from . import DocutilsTestSupport
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_literal_blocks.py b/test/test_parsers/test_rst/test_literal_blocks.py
|
|
index 62c9f40..172c438 100755
|
|
--- a/test/test_parsers/test_rst/test_literal_blocks.py
|
|
+++ b/test/test_parsers/test_rst/test_literal_blocks.py
|
|
@@ -7,8 +7,10 @@
|
|
"""
|
|
Tests for states.py.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
+
|
|
+from . import DocutilsTestSupport
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_option_lists.py b/test/test_parsers/test_rst/test_option_lists.py
|
|
index aa23e3e..740248f 100755
|
|
--- a/test/test_parsers/test_rst/test_option_lists.py
|
|
+++ b/test/test_parsers/test_rst/test_option_lists.py
|
|
@@ -7,8 +7,10 @@
|
|
"""
|
|
Tests for states.py.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
+
|
|
+from . import DocutilsTestSupport
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_outdenting.py b/test/test_parsers/test_rst/test_outdenting.py
|
|
index 1403ab7..5685767 100755
|
|
--- a/test/test_parsers/test_rst/test_outdenting.py
|
|
+++ b/test/test_parsers/test_rst/test_outdenting.py
|
|
@@ -7,8 +7,10 @@
|
|
"""
|
|
Tests for states.py.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
+
|
|
+from . import DocutilsTestSupport
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_paragraphs.py b/test/test_parsers/test_rst/test_paragraphs.py
|
|
index e4860e3..933c07b 100755
|
|
--- a/test/test_parsers/test_rst/test_paragraphs.py
|
|
+++ b/test/test_parsers/test_rst/test_paragraphs.py
|
|
@@ -7,8 +7,10 @@
|
|
"""
|
|
Tests for states.py.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
+
|
|
+from . import DocutilsTestSupport
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_section_headers.py b/test/test_parsers/test_rst/test_section_headers.py
|
|
index 0c8cd64..af3749c 100755
|
|
--- a/test/test_parsers/test_rst/test_section_headers.py
|
|
+++ b/test/test_parsers/test_rst/test_section_headers.py
|
|
@@ -5,9 +5,13 @@
|
|
# Author: David Goodger <goodger@python.org>
|
|
# Copyright: This module has been placed in the public domain.
|
|
|
|
-"""Tests for states.py."""
|
|
+"""
|
|
+Tests for states.py.
|
|
+"""
|
|
+from __future__ import absolute_import
|
|
+
|
|
+from . import DocutilsTestSupport
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_substitutions.py b/test/test_parsers/test_rst/test_substitutions.py
|
|
index e992cb2..774d71b 100755
|
|
--- a/test/test_parsers/test_rst/test_substitutions.py
|
|
+++ b/test/test_parsers/test_rst/test_substitutions.py
|
|
@@ -7,8 +7,10 @@
|
|
"""
|
|
Tests for states.py.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
+
|
|
+from . import DocutilsTestSupport
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_tables.py b/test/test_parsers/test_rst/test_tables.py
|
|
index ca249bb..4a690ff 100755
|
|
--- a/test/test_parsers/test_rst/test_tables.py
|
|
+++ b/test/test_parsers/test_rst/test_tables.py
|
|
@@ -7,9 +7,12 @@
|
|
"""
|
|
Tests for states.py.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
import os
|
|
-from __init__ import DocutilsTestSupport
|
|
+
|
|
+from . import DocutilsTestSupport
|
|
+
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_targets.py b/test/test_parsers/test_rst/test_targets.py
|
|
index f7ab8c0..6785ac3 100755
|
|
--- a/test/test_parsers/test_rst/test_targets.py
|
|
+++ b/test/test_parsers/test_rst/test_targets.py
|
|
@@ -7,8 +7,10 @@
|
|
"""
|
|
Tests for states.py.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
+
|
|
+from . import DocutilsTestSupport
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_parsers/test_rst/test_transitions.py b/test/test_parsers/test_rst/test_transitions.py
|
|
index b21411c..d3a622a 100755
|
|
--- a/test/test_parsers/test_rst/test_transitions.py
|
|
+++ b/test/test_parsers/test_rst/test_transitions.py
|
|
@@ -7,8 +7,10 @@
|
|
"""
|
|
Tests for transition markers.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
+
|
|
+from . import DocutilsTestSupport
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.ParserTestSuite()
|
|
diff --git a/test/test_readers/test_get_reader_class.py b/test/test_readers/test_get_reader_class.py
|
|
index b84dfb9..f177223 100644
|
|
--- a/test/test_readers/test_get_reader_class.py
|
|
+++ b/test/test_readers/test_get_reader_class.py
|
|
@@ -8,10 +8,12 @@
|
|
"""
|
|
test get_reader_class
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
from docutils.readers import get_reader_class
|
|
|
|
+
|
|
class GetReaderClassTestCase(DocutilsTestSupport.StandardTestCase):
|
|
|
|
def test_registered_reader(self):
|
|
@@ -29,4 +31,3 @@ class GetReaderClassTestCase(DocutilsTestSupport.StandardTestCase):
|
|
if __name__ == '__main__':
|
|
import unittest
|
|
unittest.main()
|
|
-
|
|
diff --git a/test/test_readers/test_pep/test_inline_markup.py b/test/test_readers/test_pep/test_inline_markup.py
|
|
index 3bfd294..29074d8 100755
|
|
--- a/test/test_readers/test_pep/test_inline_markup.py
|
|
+++ b/test/test_readers/test_pep/test_inline_markup.py
|
|
@@ -7,8 +7,9 @@
|
|
"""
|
|
Tests for inline markup in PEPs (readers/pep.py).
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
|
|
|
|
def suite():
|
|
diff --git a/test/test_readers/test_pep/test_rfc2822.py b/test/test_readers/test_pep/test_rfc2822.py
|
|
index 7c1b26b..1123ee9 100755
|
|
--- a/test/test_readers/test_pep/test_rfc2822.py
|
|
+++ b/test/test_readers/test_pep/test_rfc2822.py
|
|
@@ -7,8 +7,10 @@
|
|
"""
|
|
Tests for RFC-2822 headers in PEPs (readers/pep.py).
|
|
"""
|
|
+from __future__ import absolute_import
|
|
+
|
|
+from . import DocutilsTestSupport
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.PEPParserTestSuite()
|
|
diff --git a/test/test_transforms/test___init__.py b/test/test_transforms/test___init__.py
|
|
index 366701b..fded179 100755
|
|
--- a/test/test_transforms/test___init__.py
|
|
+++ b/test/test_transforms/test___init__.py
|
|
@@ -7,11 +7,13 @@
|
|
"""
|
|
Test module for transforms/__init__.py.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport # must be imported before docutils
|
|
-from docutils import transforms, utils
|
|
import unittest
|
|
|
|
+from . import DocutilsTestSupport # must be imported before docutils
|
|
+from docutils import transforms, utils
|
|
+
|
|
|
|
class TestTransform(transforms.Transform):
|
|
|
|
diff --git a/test/test_transforms/test_class.py b/test/test_transforms/test_class.py
|
|
index 9ee0484..ebd6c5a 100755
|
|
--- a/test/test_transforms/test_class.py
|
|
+++ b/test/test_transforms/test_class.py
|
|
@@ -7,8 +7,9 @@
|
|
"""
|
|
Tests for `docutils.transforms.misc.ClassAttribute`.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
from docutils.parsers.rst import Parser
|
|
|
|
|
|
diff --git a/test/test_transforms/test_contents.py b/test/test_transforms/test_contents.py
|
|
index 1caa593..de05af7 100755
|
|
--- a/test/test_transforms/test_contents.py
|
|
+++ b/test/test_transforms/test_contents.py
|
|
@@ -8,8 +8,9 @@
|
|
Tests for `docutils.transforms.parts.Contents` (via
|
|
`docutils.transforms.universal.LastReaderPending`).
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
from docutils.transforms.references import Substitutions
|
|
from docutils.parsers.rst import Parser
|
|
|
|
diff --git a/test/test_transforms/test_docinfo.py b/test/test_transforms/test_docinfo.py
|
|
index 8b543df..1f0a4a8 100755
|
|
--- a/test/test_transforms/test_docinfo.py
|
|
+++ b/test/test_transforms/test_docinfo.py
|
|
@@ -8,8 +8,9 @@
|
|
"""
|
|
Tests for docutils.transforms.frontmatter.DocInfo.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
from docutils.transforms.frontmatter import DocInfo
|
|
from docutils.parsers.rst import Parser
|
|
|
|
diff --git a/test/test_transforms/test_doctitle.py b/test/test_transforms/test_doctitle.py
|
|
index 6b354ab..7073e6a 100755
|
|
--- a/test/test_transforms/test_doctitle.py
|
|
+++ b/test/test_transforms/test_doctitle.py
|
|
@@ -7,12 +7,14 @@
|
|
"""
|
|
Tests for docutils.transforms.frontmatter.DocTitle.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
from docutils.transforms.frontmatter import DocTitle, SectionSubTitle
|
|
from docutils.parsers.rst import Parser, Directive
|
|
from docutils.parsers.rst.directives import register_directive
|
|
|
|
+
|
|
# dummy directive to test attribute merging:
|
|
class AddNameToDocumentTitle(Directive):
|
|
required_arguments = 0
|
|
diff --git a/test/test_transforms/test_expose_internals.py b/test/test_transforms/test_expose_internals.py
|
|
index 15d1d8a..9949d51 100755
|
|
--- a/test/test_transforms/test_expose_internals.py
|
|
+++ b/test/test_transforms/test_expose_internals.py
|
|
@@ -7,12 +7,14 @@
|
|
"""
|
|
Test module for universal.ExposeInternals transform.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
|
|
-from __init__ import DocutilsTestSupport # must be imported before docutils
|
|
+from . import DocutilsTestSupport # must be imported before docutils
|
|
from docutils.transforms.universal import ExposeInternals
|
|
from docutils.parsers.rst import Parser
|
|
|
|
+
|
|
def suite():
|
|
parser = Parser()
|
|
s = DocutilsTestSupport.TransformTestSuite(
|
|
diff --git a/test/test_transforms/test_filter.py b/test/test_transforms/test_filter.py
|
|
index ad82c2b..240e375 100755
|
|
--- a/test/test_transforms/test_filter.py
|
|
+++ b/test/test_transforms/test_filter.py
|
|
@@ -7,8 +7,9 @@
|
|
"""
|
|
Tests for docutils.transforms.components.Filter.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
from docutils.parsers.rst import Parser
|
|
|
|
|
|
diff --git a/test/test_transforms/test_footnotes.py b/test/test_transforms/test_footnotes.py
|
|
index ae01edf..0213e71 100755
|
|
--- a/test/test_transforms/test_footnotes.py
|
|
+++ b/test/test_transforms/test_footnotes.py
|
|
@@ -7,8 +7,9 @@
|
|
"""
|
|
Tests for docutils.transforms.references.Footnotes.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
from docutils.transforms.references import Footnotes
|
|
from docutils.parsers.rst import Parser
|
|
|
|
diff --git a/test/test_transforms/test_hyperlinks.py b/test/test_transforms/test_hyperlinks.py
|
|
index df4d790..349c810 100755
|
|
--- a/test/test_transforms/test_hyperlinks.py
|
|
+++ b/test/test_transforms/test_hyperlinks.py
|
|
@@ -7,12 +7,12 @@
|
|
"""
|
|
Tests for docutils.transforms.references.Hyperlinks.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
from docutils.transforms.references import PropagateTargets, \
|
|
AnonymousHyperlinks, IndirectHyperlinks, ExternalTargets, \
|
|
InternalTargets, DanglingReferences
|
|
-
|
|
from docutils.parsers.rst import Parser
|
|
|
|
|
|
diff --git a/test/test_transforms/test_messages.py b/test/test_transforms/test_messages.py
|
|
index 296fe98..8949c63 100755
|
|
--- a/test/test_transforms/test_messages.py
|
|
+++ b/test/test_transforms/test_messages.py
|
|
@@ -7,8 +7,9 @@
|
|
"""
|
|
Tests for docutils.transforms.universal.Messages.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
from docutils.transforms.universal import Messages
|
|
from docutils.transforms.references import Substitutions
|
|
from docutils.parsers.rst import Parser
|
|
diff --git a/test/test_transforms/test_peps.py b/test/test_transforms/test_peps.py
|
|
index 5505572..16c4bbb 100755
|
|
--- a/test/test_transforms/test_peps.py
|
|
+++ b/test/test_transforms/test_peps.py
|
|
@@ -7,8 +7,9 @@
|
|
"""
|
|
Tests for docutils.transforms.peps.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
from docutils.transforms.peps import TargetNotes
|
|
from docutils.parsers.rst import Parser
|
|
|
|
diff --git a/test/test_transforms/test_sectnum.py b/test/test_transforms/test_sectnum.py
|
|
index 525a727..e389aee 100755
|
|
--- a/test/test_transforms/test_sectnum.py
|
|
+++ b/test/test_transforms/test_sectnum.py
|
|
@@ -8,8 +8,9 @@
|
|
Tests for `docutils.transforms.parts.SectNum` (via
|
|
`docutils.transforms.universal.LastReaderPending`).
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
from docutils.transforms.references import Substitutions
|
|
from docutils.parsers.rst import Parser
|
|
|
|
diff --git a/test/test_transforms/test_smartquotes.py b/test/test_transforms/test_smartquotes.py
|
|
index e2874c0..eb5c401 100644
|
|
--- a/test/test_transforms/test_smartquotes.py
|
|
+++ b/test/test_transforms/test_smartquotes.py
|
|
@@ -16,12 +16,13 @@
|
|
"""
|
|
Test module for universal.SmartQuotes transform.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-
|
|
-from __init__ import DocutilsTestSupport # must be imported before docutils
|
|
+from . import DocutilsTestSupport # must be imported before docutils
|
|
from docutils.transforms.universal import SmartQuotes
|
|
from docutils.parsers.rst import Parser
|
|
|
|
+
|
|
def suite():
|
|
parser = Parser()
|
|
settings = {'smart_quotes': True}
|
|
diff --git a/test/test_transforms/test_strip_comments.py b/test/test_transforms/test_strip_comments.py
|
|
index f58404f..a03457b 100755
|
|
--- a/test/test_transforms/test_strip_comments.py
|
|
+++ b/test/test_transforms/test_strip_comments.py
|
|
@@ -7,8 +7,9 @@
|
|
"""
|
|
Tests for docutils.transforms.universal.StripComments.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
from docutils.transforms.universal import StripComments
|
|
from docutils.parsers.rst import Parser
|
|
|
|
diff --git a/test/test_transforms/test_strip_elements_with_class.py b/test/test_transforms/test_strip_elements_with_class.py
|
|
index 6503586..11e6aa6 100644
|
|
--- a/test/test_transforms/test_strip_elements_with_class.py
|
|
+++ b/test/test_transforms/test_strip_elements_with_class.py
|
|
@@ -7,8 +7,9 @@
|
|
"""
|
|
Tests for docutils.transforms.universal.StripComments.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
from docutils.parsers.rst import Parser
|
|
from docutils.transforms.universal import StripClassesAndElements
|
|
|
|
diff --git a/test/test_transforms/test_substitutions.py b/test/test_transforms/test_substitutions.py
|
|
index 7ea3e8a..1ec9bf1 100755
|
|
--- a/test/test_transforms/test_substitutions.py
|
|
+++ b/test/test_transforms/test_substitutions.py
|
|
@@ -7,8 +7,9 @@
|
|
"""
|
|
Tests for docutils.transforms.references.Substitutions.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
from docutils.transforms.references import Substitutions
|
|
from docutils.parsers.rst import Parser
|
|
|
|
diff --git a/test/test_transforms/test_target_notes.py b/test/test_transforms/test_target_notes.py
|
|
index 3be4001..dcfb411 100755
|
|
--- a/test/test_transforms/test_target_notes.py
|
|
+++ b/test/test_transforms/test_target_notes.py
|
|
@@ -8,8 +8,9 @@
|
|
Tests for `docutils.transforms.references.TargetNotes` (via
|
|
`docutils.transforms.universal.LastReaderPending`).
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
from docutils.transforms.references import PropagateTargets, \
|
|
AnonymousHyperlinks, IndirectHyperlinks, ExternalTargets, \
|
|
InternalTargets, DanglingReferences, Footnotes
|
|
diff --git a/test/test_transforms/test_transitions.py b/test/test_transforms/test_transitions.py
|
|
index c8ecaff..71347a2 100755
|
|
--- a/test/test_transforms/test_transitions.py
|
|
+++ b/test/test_transforms/test_transitions.py
|
|
@@ -7,11 +7,13 @@
|
|
"""
|
|
Test module for misc.Transitions transform.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport # must be imported before docutils
|
|
+from . import DocutilsTestSupport # must be imported before docutils
|
|
from docutils.transforms.misc import Transitions
|
|
from docutils.parsers.rst import Parser
|
|
|
|
+
|
|
def suite():
|
|
parser = Parser()
|
|
s = DocutilsTestSupport.TransformTestSuite(parser)
|
|
diff --git a/test/test_transforms/test_writer_aux.py b/test/test_transforms/test_writer_aux.py
|
|
index fc2e0d3..7272115 100755
|
|
--- a/test/test_transforms/test_writer_aux.py
|
|
+++ b/test/test_transforms/test_writer_aux.py
|
|
@@ -7,8 +7,9 @@
|
|
"""
|
|
Test module for writer_aux transforms.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport # must be imported before docutils
|
|
+from . import DocutilsTestSupport # must be imported before docutils
|
|
from docutils.transforms import writer_aux
|
|
from docutils.parsers.rst import Parser
|
|
|
|
diff --git a/test/test_writers/test_docutils_xml.py b/test/test_writers/test_docutils_xml.py
|
|
index 98541cf..5a6cda3 100755
|
|
--- a/test/test_writers/test_docutils_xml.py
|
|
+++ b/test/test_writers/test_docutils_xml.py
|
|
@@ -13,10 +13,11 @@ Test for docutils XML writer.
|
|
``<empty></empty>`` vs. ``<empty/>``. The sample strings in this test
|
|
module mirrors the current behaviour of the docutils_xml writer.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
from StringIO import StringIO
|
|
|
|
-from __init__ import DocutilsTestSupport # must be imported before docutils
|
|
+from . import DocutilsTestSupport # must be imported before docutils
|
|
import docutils
|
|
import docutils.core
|
|
|
|
diff --git a/test/test_writers/test_get_writer_class.py b/test/test_writers/test_get_writer_class.py
|
|
index 78e6e8a..6af7097 100644
|
|
--- a/test/test_writers/test_get_writer_class.py
|
|
+++ b/test/test_writers/test_get_writer_class.py
|
|
@@ -8,10 +8,12 @@
|
|
"""
|
|
test get_writer_class
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
from docutils.writers import get_writer_class
|
|
|
|
+
|
|
class GetWriterClassTestCase(DocutilsTestSupport.StandardTestCase):
|
|
#tests = ( ('manpage', 1), ('nope', 0), ('dummy-writer', 1))
|
|
|
|
diff --git a/test/test_writers/test_html4css1_misc.py b/test/test_writers/test_html4css1_misc.py
|
|
index 7df0176..534ebce 100755
|
|
--- a/test/test_writers/test_html4css1_misc.py
|
|
+++ b/test/test_writers/test_html4css1_misc.py
|
|
@@ -9,11 +9,14 @@
|
|
"""
|
|
Miscellaneous HTML writer tests.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
-from docutils import core
|
|
import os
|
|
|
|
+from .__init__ import DocutilsTestSupport
|
|
+from docutils import core
|
|
+
|
|
+
|
|
class EncodingTestCase(DocutilsTestSupport.StandardTestCase):
|
|
|
|
def test_xmlcharrefreplace(self):
|
|
diff --git a/test/test_writers/test_html4css1_parts.py b/test/test_writers/test_html4css1_parts.py
|
|
index 64ac2ac..9140cba 100755
|
|
--- a/test/test_writers/test_html4css1_parts.py
|
|
+++ b/test/test_writers/test_html4css1_parts.py
|
|
@@ -11,10 +11,12 @@ Note: the 'body' and 'whole' entries have been removed from the parts
|
|
dictionaries (redundant), along with 'meta' and 'stylesheet' entries with
|
|
standard values, and any entries with empty values.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
from docutils import core
|
|
|
|
+
|
|
def suite():
|
|
s = DocutilsTestSupport.HtmlPublishPartsTestSuite()
|
|
s.generateTests(totest)
|
|
diff --git a/test/test_writers/test_html4css1_template.py b/test/test_writers/test_html4css1_template.py
|
|
index 954f319..88eff36 100755
|
|
--- a/test/test_writers/test_html4css1_template.py
|
|
+++ b/test/test_writers/test_html4css1_template.py
|
|
@@ -7,11 +7,12 @@
|
|
"""
|
|
Tests for the HTML writer.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
import os
|
|
import platform
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
|
|
|
|
def suite():
|
|
diff --git a/test/test_writers/test_html5_polyglot_misc.py b/test/test_writers/test_html5_polyglot_misc.py
|
|
index 7f14133..9fec65f 100644
|
|
--- a/test/test_writers/test_html5_polyglot_misc.py
|
|
+++ b/test/test_writers/test_html5_polyglot_misc.py
|
|
@@ -9,11 +9,14 @@
|
|
"""
|
|
Miscellaneous HTML writer tests.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
-from docutils import core
|
|
import os
|
|
|
|
+from . import DocutilsTestSupport
|
|
+from docutils import core
|
|
+
|
|
+
|
|
class EncodingTestCase(DocutilsTestSupport.StandardTestCase):
|
|
|
|
def test_xmlcharrefreplace(self):
|
|
diff --git a/test/test_writers/test_html5_polyglot_parts.py b/test/test_writers/test_html5_polyglot_parts.py
|
|
index cb323b7..60ff689 100644
|
|
--- a/test/test_writers/test_html5_polyglot_parts.py
|
|
+++ b/test/test_writers/test_html5_polyglot_parts.py
|
|
@@ -11,8 +11,9 @@ Note: the 'body' and 'whole' entries have been removed from the parts
|
|
dictionaries (redundant), along with 'meta' and 'stylesheet' entries with
|
|
standard values, and any entries with empty values.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
from DocutilsTestSupport import (HtmlWriterPublishPartsTestCase,
|
|
HtmlPublishPartsTestSuite)
|
|
from docutils import core, __version__
|
|
diff --git a/test/test_writers/test_latex2e.py b/test/test_writers/test_latex2e.py
|
|
index 88ba1a7..e9defeb 100755
|
|
--- a/test/test_writers/test_latex2e.py
|
|
+++ b/test/test_writers/test_latex2e.py
|
|
@@ -8,9 +8,12 @@
|
|
"""
|
|
Tests for latex2e writer.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
import string
|
|
-from __init__ import DocutilsTestSupport
|
|
+
|
|
+from . import DocutilsTestSupport
|
|
+
|
|
|
|
def suite():
|
|
settings = {'use_latex_toc': False}
|
|
diff --git a/test/test_writers/test_manpage.py b/test/test_writers/test_manpage.py
|
|
index eec5400..a220444 100644
|
|
--- a/test/test_writers/test_manpage.py
|
|
+++ b/test/test_writers/test_manpage.py
|
|
@@ -7,8 +7,10 @@
|
|
"""
|
|
Tests for manpage writer.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
+
|
|
+from . import DocutilsTestSupport
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
|
|
def suite():
|
|
settings = {}
|
|
diff --git a/test/test_writers/test_null.py b/test/test_writers/test_null.py
|
|
index c75f8a9..3cc8f37 100755
|
|
--- a/test/test_writers/test_null.py
|
|
+++ b/test/test_writers/test_null.py
|
|
@@ -7,8 +7,10 @@
|
|
"""
|
|
Test for Null writer.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
+
|
|
+from . import DocutilsTestSupport
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.PublishTestSuite('null')
|
|
diff --git a/test/test_writers/test_odt.py b/test/test_writers/test_odt.py
|
|
index 0efeae6..a47b7fb 100755
|
|
--- a/test/test_writers/test_odt.py
|
|
+++ b/test/test_writers/test_odt.py
|
|
@@ -29,6 +29,7 @@ Instructions for adding a new test:
|
|
5. If any other tests fail, that's a possible regression.
|
|
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
import sys
|
|
import os
|
|
@@ -36,7 +37,7 @@ import zipfile
|
|
from xml.dom import minidom
|
|
import tempfile
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
|
|
import docutils
|
|
import docutils.core
|
|
diff --git a/test/test_writers/test_pseudoxml.py b/test/test_writers/test_pseudoxml.py
|
|
index 9dfa714..187dde9 100755
|
|
--- a/test/test_writers/test_pseudoxml.py
|
|
+++ b/test/test_writers/test_pseudoxml.py
|
|
@@ -7,8 +7,10 @@
|
|
"""
|
|
Test for pseudo-XML writer.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
+
|
|
+from . import DocutilsTestSupport
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
|
|
def suite():
|
|
s = DocutilsTestSupport.PublishTestSuite('pseudoxml')
|
|
diff --git a/test/test_writers/test_s5.py b/test/test_writers/test_s5.py
|
|
index 51972f3..1e955d3 100755
|
|
--- a/test/test_writers/test_s5.py
|
|
+++ b/test/test_writers/test_s5.py
|
|
@@ -7,11 +7,12 @@
|
|
"""
|
|
Tests for the S5/HTML writer.
|
|
"""
|
|
+from __future__ import absolute_import
|
|
|
|
import os
|
|
import platform
|
|
|
|
-from __init__ import DocutilsTestSupport
|
|
+from . import DocutilsTestSupport
|
|
|
|
|
|
def suite():
|
|
--
|
|
2.24.0.375.geb5ae68d41
|
|
|