summaryrefslogtreecommitdiff
path: root/docutils/test/test_writers/test_html5_template.py
Commit message (Collapse)AuthorAgeFilesLines
* Revert addition of `io.OutString` and the "auto_encode" argument.milde2023-05-021-3/+1
| | | | | | | We need a review of the "string output" interface and a consensus on the "clean" end-state before starting with the implementation. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9369 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Set "auto_encode=False" to skip en-/decoding output in tests.milde2023-04-111-2/+1
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9341 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* 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
* Refactor HTMLTranslator initialization and parts setup.milde2022-11-131-10/+11
| | | | | | | | | | | | | | | | | Use utils.xml_declaration(). Don't write charset (encoding) declaration if the intended output encoding is not known. Copy "meta" part content into "head" in `depart_document()` (i.e. after collecting all items). Obsoletes auxiliary method `add_meta()`. Remove it. Changes to the HTML output (no space character before closing tag of XML declaration, order of metadata elements) don't affect the HTML semantics, styling, and rendering. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9240 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Inline ``DocutilsTestSupport.testroot``aa-turner2022-11-091-2/+4
| | | | | | | | | - Move all usages of ``testroot`` to defining and using a ``TEST_ROOT`` constant within the module, as part of the test suite refactoring project - Avoid ``os.chdir`` calls within ``test_error_reporting`` git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9234 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Inline ``PublishTestSuite``aa-turner2022-11-081-12/+28
| | | | | | | - Move all usages of ``PublishTestSuite.generateTests`` to using subtests, as part of the test suite refactoring project git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9227 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Use f-strings in HTML 4 and HTML 5 template testsaa-turner2022-10-281-11/+11
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9191 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
* Small fixes to HTML5 output.milde2022-04-291-0/+234
Stop writing an empty line before the "footer" closing tag. Add space before "charset" meta tag closing sequence. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9054 929543f6-e4f2-0310-98a6-ba3bd3dd1d04