diff options
| author | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2022-11-26 23:15:13 +0000 |
|---|---|---|
| committer | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2022-11-26 23:15:13 +0000 |
| commit | a9d9d8d615eb0c9e0b291e29b41458ee54bb1fc7 (patch) | |
| tree | 8aae11b88516bafdfac848730e61be1b3012c7d3 /docutils/test/test_parsers | |
| parent | 987485c1ccd7884440dd312e797b9277ad763a1b (diff) | |
| download | docutils-a9d9d8d615eb0c9e0b291e29b41458ee54bb1fc7.tar.gz | |
Fix IndexError when running individual test modules under Python <3.9
Up to Python 3.8, __file__ returns a relative path for the main script
specified on the command line. Use `Path.resolve()` to make it absolute before
calling `Path.parents`.
https://docs.python.org/3/whatsnew/3.9.html#other-language-changes
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9277 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/test/test_parsers')
81 files changed, 82 insertions, 82 deletions
diff --git a/docutils/test/test_parsers/test_get_parser_class.py b/docutils/test/test_parsers/test_get_parser_class.py index 90fb13496..c3d6da43e 100644 --- a/docutils/test/test_parsers/test_get_parser_class.py +++ b/docutils/test/test_parsers/test_get_parser_class.py @@ -15,7 +15,7 @@ import unittest # so we import the local `docutils` and `test` packages. # ensure `test` package can be loaded also if not running as __main__ # (required by ``python -m unittest`` -DOCUTILS_ROOT = Path(__file__).parents[2] +DOCUTILS_ROOT = Path(__file__).resolve().parents[2] if str(DOCUTILS_ROOT) not in sys.path: sys.path.insert(0, str(DOCUTILS_ROOT)) diff --git a/docutils/test/test_parsers/test_parser.py b/docutils/test/test_parsers/test_parser.py index 317f5d28b..319c07521 100644 --- a/docutils/test/test_parsers/test_parser.py +++ b/docutils/test/test_parsers/test_parser.py @@ -14,7 +14,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[2])) + sys.path.insert(0, str(Path(__file__).resolve().parents[2])) from docutils import parsers, utils, frontend diff --git a/docutils/test/test_parsers/test_recommonmark/test_block_quotes.py b/docutils/test/test_parsers/test_recommonmark/test_block_quotes.py index 7a34e02f7..2ff569ddb 100755 --- a/docutils/test/test_parsers/test_recommonmark/test_block_quotes.py +++ b/docutils/test/test_parsers/test_recommonmark/test_block_quotes.py @@ -21,7 +21,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings from docutils.utils import new_document diff --git a/docutils/test/test_parsers/test_recommonmark/test_bullet_lists.py b/docutils/test/test_parsers/test_recommonmark/test_bullet_lists.py index b39b36773..a94f68d47 100755 --- a/docutils/test/test_parsers/test_recommonmark/test_bullet_lists.py +++ b/docutils/test/test_parsers/test_recommonmark/test_bullet_lists.py @@ -21,7 +21,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings try: diff --git a/docutils/test/test_parsers/test_recommonmark/test_enumerated_lists.py b/docutils/test/test_parsers/test_recommonmark/test_enumerated_lists.py index a5a21c811..cea4e8782 100755 --- a/docutils/test/test_parsers/test_recommonmark/test_enumerated_lists.py +++ b/docutils/test/test_parsers/test_recommonmark/test_enumerated_lists.py @@ -20,7 +20,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings from docutils.utils import new_document diff --git a/docutils/test/test_parsers/test_recommonmark/test_html_blocks.py b/docutils/test/test_parsers/test_recommonmark/test_html_blocks.py index 90ec9c43b..727e6d150 100755 --- a/docutils/test/test_parsers/test_recommonmark/test_html_blocks.py +++ b/docutils/test/test_parsers/test_recommonmark/test_html_blocks.py @@ -21,7 +21,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings try: diff --git a/docutils/test/test_parsers/test_recommonmark/test_inline_markup.py b/docutils/test/test_parsers/test_recommonmark/test_inline_markup.py index a8dfd36f6..dddac8bff 100755 --- a/docutils/test/test_parsers/test_recommonmark/test_inline_markup.py +++ b/docutils/test/test_parsers/test_recommonmark/test_inline_markup.py @@ -20,7 +20,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings try: diff --git a/docutils/test/test_parsers/test_recommonmark/test_line_length_limit.py b/docutils/test/test_parsers/test_recommonmark/test_line_length_limit.py index 749deb3d0..e0a13a53a 100755 --- a/docutils/test/test_parsers/test_recommonmark/test_line_length_limit.py +++ b/docutils/test/test_parsers/test_recommonmark/test_line_length_limit.py @@ -21,7 +21,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings try: diff --git a/docutils/test/test_parsers/test_recommonmark/test_line_length_limit_default.py b/docutils/test/test_parsers/test_recommonmark/test_line_length_limit_default.py index 5c5c8e0a7..cdcf3d860 100755 --- a/docutils/test/test_parsers/test_recommonmark/test_line_length_limit_default.py +++ b/docutils/test/test_parsers/test_recommonmark/test_line_length_limit_default.py @@ -22,7 +22,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings try: diff --git a/docutils/test/test_parsers/test_recommonmark/test_literal_blocks.py b/docutils/test/test_parsers/test_recommonmark/test_literal_blocks.py index 94b28c547..2325a378f 100755 --- a/docutils/test/test_parsers/test_recommonmark/test_literal_blocks.py +++ b/docutils/test/test_parsers/test_recommonmark/test_literal_blocks.py @@ -21,7 +21,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings try: diff --git a/docutils/test/test_parsers/test_recommonmark/test_misc.py b/docutils/test/test_parsers/test_recommonmark/test_misc.py index 7e52d0747..e092c6ed8 100755 --- a/docutils/test/test_parsers/test_recommonmark/test_misc.py +++ b/docutils/test/test_parsers/test_recommonmark/test_misc.py @@ -20,7 +20,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.core import publish_string from docutils.parsers.rst import directives as rst_directives diff --git a/docutils/test/test_parsers/test_recommonmark/test_paragraphs.py b/docutils/test/test_parsers/test_recommonmark/test_paragraphs.py index 08ec3aae5..775a861e1 100755 --- a/docutils/test/test_parsers/test_recommonmark/test_paragraphs.py +++ b/docutils/test/test_parsers/test_recommonmark/test_paragraphs.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings try: diff --git a/docutils/test/test_parsers/test_recommonmark/test_section_headers.py b/docutils/test/test_parsers/test_recommonmark/test_section_headers.py index 4970c814e..853001a32 100755 --- a/docutils/test/test_parsers/test_recommonmark/test_section_headers.py +++ b/docutils/test/test_parsers/test_recommonmark/test_section_headers.py @@ -20,7 +20,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings diff --git a/docutils/test/test_parsers/test_recommonmark/test_targets.py b/docutils/test/test_parsers/test_recommonmark/test_targets.py index cee0d6898..75fd89cc0 100755 --- a/docutils/test/test_parsers/test_recommonmark/test_targets.py +++ b/docutils/test/test_parsers/test_recommonmark/test_targets.py @@ -20,7 +20,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings diff --git a/docutils/test/test_parsers/test_recommonmark/test_transitions.py b/docutils/test/test_parsers/test_recommonmark/test_transitions.py index e87fa6b9d..1110a6302 100755 --- a/docutils/test/test_parsers/test_recommonmark/test_transitions.py +++ b/docutils/test/test_parsers/test_recommonmark/test_transitions.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings diff --git a/docutils/test/test_parsers/test_rst/test_SimpleTableParser.py b/docutils/test/test_parsers/test_rst/test_SimpleTableParser.py index 358439a0f..a19e496af 100755 --- a/docutils/test/test_parsers/test_rst/test_SimpleTableParser.py +++ b/docutils/test/test_parsers/test_rst/test_SimpleTableParser.py @@ -14,7 +14,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.parsers.rst import tableparser from docutils.statemachine import StringList, string2lines diff --git a/docutils/test/test_parsers/test_rst/test_TableParser.py b/docutils/test/test_parsers/test_rst/test_TableParser.py index 09e66102a..3c999dd16 100755 --- a/docutils/test/test_parsers/test_rst/test_TableParser.py +++ b/docutils/test/test_parsers/test_rst/test_TableParser.py @@ -14,7 +14,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.parsers.rst import tableparser from docutils.statemachine import StringList, string2lines diff --git a/docutils/test/test_parsers/test_rst/test_block_quotes.py b/docutils/test/test_parsers/test_rst/test_block_quotes.py index 6c4732664..d16d1bc9c 100755 --- a/docutils/test/test_parsers/test_rst/test_block_quotes.py +++ b/docutils/test/test_parsers/test_rst/test_block_quotes.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_bullet_lists.py b/docutils/test/test_parsers/test_rst/test_bullet_lists.py index cc7fc5fb1..6157a38c4 100755 --- a/docutils/test/test_parsers/test_rst/test_bullet_lists.py +++ b/docutils/test/test_parsers/test_rst/test_bullet_lists.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_character_level_inline_markup.py b/docutils/test/test_parsers/test_rst/test_character_level_inline_markup.py index a031878ee..c25baac59 100644 --- a/docutils/test/test_parsers/test_rst/test_character_level_inline_markup.py +++ b/docutils/test/test_parsers/test_rst/test_character_level_inline_markup.py @@ -17,7 +17,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_citations.py b/docutils/test/test_parsers/test_rst/test_citations.py index 9e62fe96a..c30b5ae52 100755 --- a/docutils/test/test_parsers/test_rst/test_citations.py +++ b/docutils/test/test_parsers/test_rst/test_citations.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_comments.py b/docutils/test/test_parsers/test_rst/test_comments.py index a91359027..80d1e9544 100755 --- a/docutils/test/test_parsers/test_rst/test_comments.py +++ b/docutils/test/test_parsers/test_rst/test_comments.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_definition_lists.py b/docutils/test/test_parsers/test_rst/test_definition_lists.py index 49c2b2331..64c616dda 100755 --- a/docutils/test/test_parsers/test_rst/test_definition_lists.py +++ b/docutils/test/test_parsers/test_rst/test_definition_lists.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_directives/test__init__.py b/docutils/test/test_parsers/test_rst/test_directives/test__init__.py index 275a04170..ebf9672be 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test__init__.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test__init__.py @@ -20,7 +20,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) import docutils import docutils.parsers.null diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_admonitions.py b/docutils/test/test_parsers/test_rst/test_directives/test_admonitions.py index e9269225f..09324a7df 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_admonitions.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_admonitions.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_admonitions_de.py b/docutils/test/test_parsers/test_rst/test_directives/test_admonitions_de.py index 387ce4f78..00214ce02 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_admonitions_de.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_admonitions_de.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser, directives, roles diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_admonitions_dummy_lang.py b/docutils/test/test_parsers/test_rst/test_directives/test_admonitions_dummy_lang.py index baf0f35fc..7fe58317b 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_admonitions_dummy_lang.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_admonitions_dummy_lang.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_block_quotes.py b/docutils/test/test_parsers/test_rst/test_directives/test_block_quotes.py index 08a12f315..64dcb1d48 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_block_quotes.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_block_quotes.py @@ -16,7 +16,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_class.py b/docutils/test/test_parsers/test_rst/test_directives/test_class.py index d21dc81bf..213279985 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_class.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_class.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_code.py b/docutils/test/test_parsers/test_rst/test_directives/test_code.py index 289258f3f..81efaaefa 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_code.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_code.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_code_long.py b/docutils/test/test_parsers/test_rst/test_directives/test_code_long.py index 3b966f0ea..07f1b9f36 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_code_long.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_code_long.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_code_none.py b/docutils/test/test_parsers/test_rst/test_directives/test_code_none.py index cb8cfd2d9..dc90207e1 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_code_none.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_code_none.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_code_parsing.py b/docutils/test/test_parsers/test_rst/test_directives/test_code_parsing.py index f7cdf2162..5099e11fb 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_code_parsing.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_code_parsing.py @@ -20,7 +20,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) from docutils.core import publish_string from docutils.utils.code_analyzer import with_pygments diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_compound.py b/docutils/test/test_parsers/test_rst/test_directives/test_compound.py index 850753218..20fcac769 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_compound.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_compound.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_container.py b/docutils/test/test_parsers/test_rst/test_directives/test_container.py index e125035f3..ed32fbdb6 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_container.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_container.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_contents.py b/docutils/test/test_parsers/test_rst/test_directives/test_contents.py index eada86c26..326f6ed6a 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_contents.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_contents.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_date.py b/docutils/test/test_parsers/test_rst/test_directives/test_date.py index 97e0573bd..b3a2d86a4 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_date.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_date.py @@ -16,7 +16,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) from docutils.io import _locale_encoding # noqa from docutils.frontend import get_default_settings diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_decorations.py b/docutils/test/test_parsers/test_rst/test_directives/test_decorations.py index 3ef3c3407..2e15c260a 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_decorations.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_decorations.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_default_role.py b/docutils/test/test_parsers/test_rst/test_directives/test_default_role.py index 0d16531ac..118527200 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_default_role.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_default_role.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_figures.py b/docutils/test/test_parsers/test_rst/test_directives/test_figures.py index f1f83a4c8..62b360fc9 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_figures.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_figures.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_images.py b/docutils/test/test_parsers/test_rst/test_directives/test_images.py index f0fa3b030..375093cc0 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_images.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_images.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_include.py b/docutils/test/test_parsers/test_rst/test_directives/test_include.py index 2c80758ce..d5db404c5 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_include.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_include.py @@ -15,7 +15,7 @@ import sys if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) from docutils import parsers, utils from docutils.frontend import get_default_settings @@ -23,7 +23,7 @@ from docutils.parsers.rst import Parser from docutils.utils import new_document from docutils.utils.code_analyzer import with_pygments -TEST_ROOT = Path(__file__).parents[3] +TEST_ROOT = Path(__file__).resolve().parents[3] # optional 3rd-party markdown parser diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_line_blocks.py b/docutils/test/test_parsers/test_rst/test_directives/test_line_blocks.py index e94b345e9..cf59edfd4 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_line_blocks.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_line_blocks.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_math.py b/docutils/test/test_parsers/test_rst/test_directives/test_math.py index 3bb5298b2..66b46a578 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_math.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_math.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_meta.py b/docutils/test/test_parsers/test_rst/test_directives/test_meta.py index d17aece1a..b336208ff 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_meta.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_meta.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_parsed_literals.py b/docutils/test/test_parsers/test_rst/test_directives/test_parsed_literals.py index f8419c4c5..c8f47ba7f 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_parsed_literals.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_parsed_literals.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_raw.py b/docutils/test/test_parsers/test_rst/test_directives/test_raw.py index d0b459711..0541d0e2e 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_raw.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_raw.py @@ -16,7 +16,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_replace.py b/docutils/test/test_parsers/test_rst/test_directives/test_replace.py index fcedd73e5..315f2357e 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_replace.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_replace.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_replace_fr.py b/docutils/test/test_parsers/test_rst/test_directives/test_replace_fr.py index d34493c5d..5e7b90464 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_replace_fr.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_replace_fr.py @@ -16,7 +16,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_role.py b/docutils/test/test_parsers/test_rst/test_directives/test_role.py index 129930d86..7d562ebe2 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_role.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_role.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser, roles diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_rubrics.py b/docutils/test/test_parsers/test_rst/test_directives/test_rubrics.py index 8c0137525..541c6ed8f 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_rubrics.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_rubrics.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_sectnum.py b/docutils/test/test_parsers/test_rst/test_directives/test_sectnum.py index a879b2972..7f3e0a720 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_sectnum.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_sectnum.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_sidebars.py b/docutils/test/test_parsers/test_rst/test_directives/test_sidebars.py index 89f15a483..8dd8f4975 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_sidebars.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_sidebars.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_tables.py b/docutils/test/test_parsers/test_rst/test_directives/test_tables.py index 12ef481b8..dd7c0b982 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_tables.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_tables.py @@ -18,7 +18,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_target_notes.py b/docutils/test/test_parsers/test_rst/test_directives/test_target_notes.py index dd5a84c20..f412cc878 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_target_notes.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_target_notes.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_test_directives.py b/docutils/test/test_parsers/test_rst/test_directives/test_test_directives.py index 919b7f468..4a0bca072 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_test_directives.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_test_directives.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_title.py b/docutils/test/test_parsers/test_rst/test_directives/test_title.py index b807a7a92..e99500101 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_title.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_title.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_topics.py b/docutils/test/test_parsers/test_rst/test_directives/test_topics.py index 02ab530f7..a8c49f5f9 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_topics.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_topics.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_unicode.py b/docutils/test/test_parsers/test_rst/test_directives/test_unicode.py index 4134858da..7c592cb6f 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_unicode.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_unicode.py @@ -16,7 +16,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_unknown.py b/docutils/test/test_parsers/test_rst/test_directives/test_unknown.py index 5ddabe87a..ce36a120e 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_unknown.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_unknown.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[4])) + sys.path.insert(0, str(Path(__file__).resolve().parents[4])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_doctest_blocks.py b/docutils/test/test_parsers/test_rst/test_doctest_blocks.py index da188f823..d75b5e7ae 100755 --- a/docutils/test/test_parsers/test_rst/test_doctest_blocks.py +++ b/docutils/test/test_parsers/test_rst/test_doctest_blocks.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_east_asian_text.py b/docutils/test/test_parsers/test_rst/test_east_asian_text.py index f6434102c..896494a5e 100755 --- a/docutils/test/test_parsers/test_rst/test_east_asian_text.py +++ b/docutils/test/test_parsers/test_rst/test_east_asian_text.py @@ -14,7 +14,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_enumerated_lists.py b/docutils/test/test_parsers/test_rst/test_enumerated_lists.py index 76d127c5d..3a03b0a6a 100755 --- a/docutils/test/test_parsers/test_rst/test_enumerated_lists.py +++ b/docutils/test/test_parsers/test_rst/test_enumerated_lists.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_field_lists.py b/docutils/test/test_parsers/test_rst/test_field_lists.py index b5b78df46..613ee5e04 100755 --- a/docutils/test/test_parsers/test_rst/test_field_lists.py +++ b/docutils/test/test_parsers/test_rst/test_field_lists.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_footnotes.py b/docutils/test/test_parsers/test_rst/test_footnotes.py index e51fdd735..e9b582e4a 100755 --- a/docutils/test/test_parsers/test_rst/test_footnotes.py +++ b/docutils/test/test_parsers/test_rst/test_footnotes.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_inline_markup.py b/docutils/test/test_parsers/test_rst/test_inline_markup.py index 9bf6d4ef7..3d5388fcf 100755 --- a/docutils/test/test_parsers/test_rst/test_inline_markup.py +++ b/docutils/test/test_parsers/test_rst/test_inline_markup.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_interpreted.py b/docutils/test/test_parsers/test_rst/test_interpreted.py index 13359031b..9409efd18 100755 --- a/docutils/test/test_parsers/test_rst/test_interpreted.py +++ b/docutils/test/test_parsers/test_rst/test_interpreted.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_interpreted_fr.py b/docutils/test/test_parsers/test_rst/test_interpreted_fr.py index 8418881ca..19cd06bf6 100644 --- a/docutils/test/test_parsers/test_rst/test_interpreted_fr.py +++ b/docutils/test/test_parsers/test_rst/test_interpreted_fr.py @@ -16,7 +16,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser, roles diff --git a/docutils/test/test_parsers/test_rst/test_line_blocks.py b/docutils/test/test_parsers/test_rst/test_line_blocks.py index 52ebcd512..0f9f52367 100755 --- a/docutils/test/test_parsers/test_rst/test_line_blocks.py +++ b/docutils/test/test_parsers/test_rst/test_line_blocks.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_line_length_limit.py b/docutils/test/test_parsers/test_rst/test_line_length_limit.py index c2adcae82..fa32a94e4 100755 --- a/docutils/test/test_parsers/test_rst/test_line_length_limit.py +++ b/docutils/test/test_parsers/test_rst/test_line_length_limit.py @@ -22,7 +22,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_line_length_limit_default.py b/docutils/test/test_parsers/test_rst/test_line_length_limit_default.py index 8f828213d..49df24a0f 100755 --- a/docutils/test/test_parsers/test_rst/test_line_length_limit_default.py +++ b/docutils/test/test_parsers/test_rst/test_line_length_limit_default.py @@ -21,7 +21,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_literal_blocks.py b/docutils/test/test_parsers/test_rst/test_literal_blocks.py index ce3e3b75e..8683b28c4 100755 --- a/docutils/test/test_parsers/test_rst/test_literal_blocks.py +++ b/docutils/test/test_parsers/test_rst/test_literal_blocks.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_option_lists.py b/docutils/test/test_parsers/test_rst/test_option_lists.py index a8df8ab7a..483ea2f97 100755 --- a/docutils/test/test_parsers/test_rst/test_option_lists.py +++ b/docutils/test/test_parsers/test_rst/test_option_lists.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_outdenting.py b/docutils/test/test_parsers/test_rst/test_outdenting.py index ad05c4e78..936250b49 100755 --- a/docutils/test/test_parsers/test_rst/test_outdenting.py +++ b/docutils/test/test_parsers/test_rst/test_outdenting.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_paragraphs.py b/docutils/test/test_parsers/test_rst/test_paragraphs.py index ddba8186c..f4bf8eb57 100755 --- a/docutils/test/test_parsers/test_rst/test_paragraphs.py +++ b/docutils/test/test_parsers/test_rst/test_paragraphs.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_section_headers.py b/docutils/test/test_parsers/test_rst/test_section_headers.py index e2d2c77bd..b89aaa65f 100755 --- a/docutils/test/test_parsers/test_rst/test_section_headers.py +++ b/docutils/test/test_parsers/test_rst/test_section_headers.py @@ -14,7 +14,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_source_line.py b/docutils/test/test_parsers/test_rst/test_source_line.py index 9b0fc59a0..e2a90ee69 100644 --- a/docutils/test/test_parsers/test_rst/test_source_line.py +++ b/docutils/test/test_parsers/test_rst/test_source_line.py @@ -31,7 +31,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_substitutions.py b/docutils/test/test_parsers/test_rst/test_substitutions.py index d562f3ab3..09c8e16a5 100755 --- a/docutils/test/test_parsers/test_rst/test_substitutions.py +++ b/docutils/test/test_parsers/test_rst/test_substitutions.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_tables.py b/docutils/test/test_parsers/test_rst/test_tables.py index a7d8c3c8b..b299de2ff 100755 --- a/docutils/test/test_parsers/test_rst/test_tables.py +++ b/docutils/test/test_parsers/test_rst/test_tables.py @@ -17,7 +17,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_targets.py b/docutils/test/test_parsers/test_rst/test_targets.py index f4e97e585..ae8e763d9 100755 --- a/docutils/test/test_parsers/test_rst/test_targets.py +++ b/docutils/test/test_parsers/test_rst/test_targets.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser diff --git a/docutils/test/test_parsers/test_rst/test_transitions.py b/docutils/test/test_parsers/test_rst/test_transitions.py index af630f202..1350b3467 100755 --- a/docutils/test/test_parsers/test_rst/test_transitions.py +++ b/docutils/test/test_parsers/test_rst/test_transitions.py @@ -15,7 +15,7 @@ import unittest if __name__ == '__main__': # prepend the "docutils root" to the Python library path # so we import the local `docutils` package. - sys.path.insert(0, str(Path(__file__).parents[3])) + sys.path.insert(0, str(Path(__file__).resolve().parents[3])) from docutils.frontend import get_default_settings from docutils.parsers.rst import Parser |
