summaryrefslogtreecommitdiff
path: root/docutils/test/test_transforms/test_substitutions.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix IndexError when running individual test modules under Python <3.9milde2022-11-261-1/+1
| | | | | | | | | 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
* Fix import errors with ``python -m unittest``.milde2022-11-251-1/+6
| | | | | | | | Running standard unittest on the test suite resulted in 89 ImportErrors because ``import DocutilsTestSupport was used to set up sys.path() but the module could not be found on the original sys.path(). git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9274 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Remove spurious "import unittest" from test scripts.milde2022-11-241-1/+0
| | | | | | | There was a "late" import if __name__ == "__main__" which is no longer required when importing `unittest` at the top. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9269 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Inline ``TransformTestSuite``aa-turner2022-11-091-8/+26
| | | | | | | | | - Move all usages of ``TransformTestSuite.generateTests`` to using subtests, as part of the test suite refactoring project - Fix the global state issues with ``test_hyperlinks_de`` and run the test as part of ``alltests.py`` git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9229 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Remove all ``import __init__`` statements, as part of theaa-turner2022-10-211-2/+0
| | | | | | | unittest migration. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9141 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Import ``DocutilsTestSupport`` from ``test``aa-turner2022-10-211-1/+1
| | | | | | | | | | | | This is the first step of moving to the standard ``unittest`` style. It involves making the ``test/`` directory a psuedo-package and importing the ``DocutilsTestSupport`` module from it, instead of the path manipulation previously carried out in ``__init__.py`` files. As of this, we also blank out all ``__init__.py`` files in the test directories. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9140 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Remove unused imports.milde2022-03-051-1/+1
| | | | | | flake8 rule F401 git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9037 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Ensure 2 blank lines around top-level functions and classes.milde2022-03-041-0/+1
| | | | | | | | flake8 rules E302: expected 2 blank lines, found 1 E305: expected 2 blank lines after class or function definition git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9026 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Fix trailing whitespace (flake warning W291).milde2022-01-291-3/+3
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8992 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Drop string prefix "u".milde2022-01-261-10/+10
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8983 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Remove 2.7-compatibility __future__ imports.milde2022-01-031-2/+1
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8925 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Reorganise functional tests.milde2021-06-301-0/+18
| | | | | | | | | | | Move additional tests for special features or problems specific to the output format from the "standalone_..." generic test case to additional tests. Use unit test instead of functional test for the fix in r6155 (hyperlink references in substitutions). git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8784 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Change default value for the "auto_id_prefix" setting to "%".milde2021-06-181-12/+12
| | | | | | | Auto-generated IDs use the tag name as prefix. Set auto_id_prefix_ to "id" if you want unchanged auto-IDs. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8771 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Restore support for running tests stand-alone.milde2020-01-311-1/+3
| | | | | | | | | After the switch to absolute imports, individual test could no longer be run in from their directory (import error). This patch makes the `pythonpath` expansion in the test subdirectories' ``__init__`` files functional again. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8481 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* py3: Use 'absolute_import' futuremilde2019-08-261-1/+2
| | | | | | | | 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
* Fix py38 SyntaxWarning: invalid escape sequence \grubert2019-08-111-2/+2
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8311 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Add <target> to one more testcase (see r8206).milde2017-12-191-1/+1
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8207 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* unroll problematic refs to their origin in document when reporting errorsmilde2017-05-041-1/+1
| | | | | | | Patch by Kirill Smelkov. This is part of the (partially outdated) suite of patches on https://sourceforge.net/p/docutils/patches/67/. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8067 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Copy the "rawsource" attribute as well when doing node.copy() or ↵gbrandl2010-07-031-0/+1
| | | | | | | | node.deepcopy(). Adjust the tests accordingly. See http://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTimey1JHAuDk2tDKn2OxdQypbZ41LYZZ7KuxcSwM%40mail.gmail.com&forum_name=docutils-develop for discussion. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@6351 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* merged directives branch to trunk (r4375:4666);wiemann2006-07-121-2/+8
| | | | | | | | assert that block quote directives have content; improved test for block quote directives (test_block_quotes); deleted test_epigraphs_etc (replaced by test_block_quotes) git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@4667 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* use $Id$ instead of $Date$ and $Revision$;wiemann2006-05-211-4/+2
| | | | | | | | collapsed Author and Contact fields; use canonical email addresses for David and Felix; (I have reviewed the diff) git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@4564 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Fixed bug with circular substitution definitions that put Docutils into an ↵goodger2005-12-281-0/+84
| | | | | | infinite loop. Circular substitution definitions are now detected & reported. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@4233 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* disallow anonymous hyperlink references and auto-numbered footnoteswiemann2005-10-111-4/+7
| | | | | | inside of substitution definitions git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@3937 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* added Node.deepcopy(); fixed bug with doubly-indirect substitutionswiemann2005-10-111-45/+43
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@3935 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* disallow targets inside substitution definitionswiemann2005-10-111-0/+24
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@3933 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Added ``serial_escape`` function; escapes string values that are elements of ↵goodger2005-10-021-1/+1
| | | | | | a list, for serialization. Modified Docutils-XML writing (``Element._dom_node``) and pseudo-XML writing (``Element.starttag``) to use ``serial_escape``. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@3915 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* restored a bug (removed in r3807) which lingers; added a commented-out test ↵goodger2005-08-151-0/+45
| | | | | | case for said bug; removed a bogus bug git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@3809 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* removed bug with indirect substitutions; seems to be fixedwiemann2005-08-141-0/+25
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@3807 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* merged rev. 3094:3101 and 3102:HEAD from branches/multiple-ids to trunkwiemann2005-03-261-14/+14
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@3129 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Added support for trimming whitespace from beside substitution references.goodger2004-11-021-0/+23
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@2796 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* added comments to "unicode" directivegoodger2003-06-221-0/+26
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@1494 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* updatedgoodger2003-06-121-7/+19
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@1434 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* updatedgoodger2003-05-241-0/+29
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@1340 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* substitutions made case-sensitive but forgiving (case-insensitive fallback)goodger2003-03-271-0/+24
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@1236 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* updatedgoodger2002-10-081-7/+7
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@774 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* updatedgoodger2002-08-211-3/+3
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@572 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* updatedgoodger2002-05-051-2/+2
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@91 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* enabled running standalonegoodger2002-04-251-2/+1
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@47 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Initial revisiongoodger2002-04-201-0/+61
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@18 929543f6-e4f2-0310-98a6-ba3bd3dd1d04