summaryrefslogtreecommitdiff
path: root/docutils/test/test_transforms/test_doctitle.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
* 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
* Reset not only `_roles` but also `_directives` cache dictionary.milde2022-11-241-3/+9
| | | | | | | | | | | | | | | | Clean the global caches to ensure predictable test results. (There were additional warnings for undefined directive and role names under Windows. These were suppressed due to other tests adding canonical names to the cache under Linux.) Add additional warnings to the expected output samples. Registering directives at test module level no longer works. Move `register_directive()` call to the test function. Signed-off-by: milde <milde@users.sf.net> git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9265 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/+3
| | | | | | | | 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 whitespace before/after delimiters and colon.milde2022-03-031-1/+1
| | | | | | | | | | | | | | Flake rules E201 whitespace after '(' E202 whitespace before '}' E203 whitespace before ':' E211 whitespace before '(' Exception: : as binary operator in extended slices (cf. https://www.python.org/dev/peps/pep-0008/#pet-peeves). git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9015 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
* 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/+3
| | | | | | | | 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-8/+8
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8311 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Apply [ 2714873 ] Fix for the overwritting of document attributes.milde2013-01-211-1/+35
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7595 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
* Added ``serial_escape`` function; escapes string values that are elements of ↵goodger2005-10-021-8/+8
| | | | | | 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
* move metadata title into document['title']wiemann2005-06-291-9/+11
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@3621 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* renamed command-line options for SectSubTitle transform (plural reads ↵goodger2005-05-191-2/+2
| | | | | | better); tweaked test text git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@3353 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* added SectSubTitle transformwiemann2005-05-181-2/+35
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@3351 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* merged rev. 3094:3101 and 3102:HEAD from branches/multiple-ids to trunkwiemann2005-03-261-13/+13
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@3129 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* added test for substitution_definitions and targets before doctitlewiemann2004-10-311-0/+21
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@2790 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* updatedgoodger2002-10-081-6/+6
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@774 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Fixed "xml:space" attribute.goodger2002-09-241-4/+4
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@711 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Updated for the new "line" attribute of system messages.goodger2002-09-041-4/+5
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@624 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* updatedgoodger2002-08-211-13/+13
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@572 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* updatedgoodger2002-08-081-2/+2
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@487 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/+175
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@18 929543f6-e4f2-0310-98a6-ba3bd3dd1d04