summaryrefslogtreecommitdiff
path: root/docutils/test/test_writers/test_html4css1_misc.py
Commit message (Collapse)AuthorAgeFilesLines
* Revert addition of `io.OutString` and the "auto_encode" argument.milde2023-05-021-6/+4
| | | | | | | 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-5/+6
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9341 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Revert introduction of `core.publish_bytes()` and `io.BytesOutput`.milde2023-04-081-1/+1
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9339 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
* Make the tests agnostic to the working directoryaa-turner2022-11-101-10/+30
| | | | | | | | | | | Previously, the test suite only worked when the current working directory was ``docutils/test/`. With this change all relative paths are calculated explicitly such that the working directory no longer affects the tests, meaning a less fragile test environment and greater flexibility to use test runners other than ``alltests.py``. This is part of the test suite refactoring project. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9236 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Partially revert r9167aa-turner2022-11-021-0/+1
| | | | | | | | | | | | | | | | | | | | ``docutils.core.publish_string`` uses Python 2 notion of a bytestring, such that in the general case it returns Python 3's ``bytes`` type. Revision 9167 attempted to address this distinction by introducing ``publish_bytes`` and changing ``publish_string`` to always return unicode text data as Python's ``str`` type. This is a backwards compatibility break, so in this commit we restore the previous behaviour, whilst simultaneously deprecating support for returning binary data from the ``docutils.core.publish_string`` function for at least two releases of Docutils. As part of this, we also deprecate returning binary data from the ``docutils.io.StringOutput.encode`` method, docutils.io.BytesOutput`` should be used in its stead. Finally, we update tests for the reversion to the previous behaviour. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9202 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Simplify ``CustomTestCase.compare_output``aa-turner2022-10-211-3/+3
| | | | | | | | Ensure that the ``core.publish_string`` always returns a string, introduce ``core.publish_bytes`` for binary output. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9167 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Subclass directly from ``unittest.TestCase``aa-turner2022-10-211-5/+5
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9148 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 missing whitespace after ',' or ':'.milde2022-03-031-2/+2
| | | | | | | | flake8 rule E231. Mostly trailing commas in list and dictionary literals. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9018 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Fix missing whitespace around operator.milde2022-03-031-1/+1
| | | | | | | | | | | | | | flake8 rules E225: missing whitespace around operator E226: missing whitespace around arithmetic operator E228: missing whitespace around modulo operator Keep ignoring the latter two rules: PEP8 limits the recommendation to "operators with lowest priority" "if operators with different priorities are used". flake8 also flags top level operators. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9017 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Fix code indentationmilde2022-01-291-54/+55
| | | | | | | | | | | | | | | | | | | | Check conformance to our coding policies with flake8. Fix the following problems: E111 indentation is not a multiple of four E114 indentation is not a multiple of four (comment) E115 expected an indented block (comment) E116 unexpected indentation (comment) E117 over-indented E121 continuation line under-indented for hanging indent E122 continuation line missing indentation or outdented E124 closing bracked does not match visual indentaion E127 continuation line over-indented for visual indent E128 continuation line under-indented for visual indent E131 continuation line unaligned for hanging indent git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8994 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Drop string prefix "u".milde2022-01-261-2/+2
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8983 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Remove redundant parenthesesmilde2022-01-261-1/+1
| | | | | | Patch by Adam Turner. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8976 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Remove "coding:" slugmilde2022-01-031-2/+0
| | | | | | Only required with Python 2.x. Encoding in Py3k is utf8 by default. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8926 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
* Add DeprecationWarnings and FutureWarnings for planned changes.milde2021-11-051-0/+1
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8880 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* py3: Use 'absolute_import' futuremilde2019-08-261-2/+5
| | | | | | | | 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
* Drop 2.4 and 2.5 compatibility code, part 2.milde2017-08-141-4/+3
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8164 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Fix [ 319 ] MathJax CDN shut down on April 30, 2017. milde2017-06-161-3/+3
| | | | | | | | For security reasons, we do not use a third party public installation as default. Instead, if warn if math-output_ is set to MathJax without URL and use a local MathJax installation on the client machine as fallback. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8115 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Adapt test to fixes in course of the HTML-writer code "outsourcing":milde2016-11-291-1/+1
| | | | | | | | * update mathjax URL * do not wrap attribution in <cite> (as the cite element should be used to name a work, not a person). git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7979 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Rename html_plain writer to html5_polyglott.milde2016-08-181-1/+1
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7969 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Test update.milde2016-05-241-2/+2
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7940 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Rename html_base writer to html_plain, move xhtml11 writer back to sandbox.milde2015-07-161-1/+1
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7901 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Fix setup.py and tests after addition of writers/html_base and mv of math.css.milde2015-03-101-1/+1
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7817 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Fix [ 266 ] creating labels/class values in description list items.milde2015-02-261-0/+42
| | | | | | | Also clarify the documentation of "class" directive and internal hyperlink targets applying to the next element also if at the end of an indented block. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7804 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* HACK around tests that depend on directory contents.grubert2014-07-061-1/+3
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7767 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Bugfix: do not make "stylesheet-path"s absolute.milde2013-03-151-0/+10
| | | | | | | | The --stylesheet-path arguments are searched in the --stylesheet-dirs, therefore must not be made absolute before. Thanks to Martin Gignac for tracking down the bug. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7630 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* New default for `math-output` setting: "HTML math.css".milde2013-03-041-5/+18
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7623 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* New setting `stylesheet_dirs`.milde2013-03-021-15/+65
| | | | | | | | | | | | | | | | Comma-separated list of directories where stylesheets are found. Used by `stylesheet_path` when expanding relative path arguments. Now, it is easy to add a custom stylesheet to Docutils default stylesheet with, e.g., --stylesheet_path="html4css1.css, mystyle.css" Changed behaviour of the default settings: if there is a file "html4css1.css" in the working directory of the process at launch, it is used instead of the one provided by Docutils in the writer source directory. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7618 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Code cleanup and test html math output options.milde2012-10-251-3/+56
| | | | | | | | Based on patch by Dmitry Shachnev. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7534 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Cleanup: Use True/False for boolean valuesmilde2012-01-191-4/+5
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7320 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Convert docutils to Python 3 (at least so that it runs the test suite.)gbrandl2009-04-011-3/+4
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@5889 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* adjusted name and email addresswiemann2007-05-311-1/+1
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@5174 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
* converted latin1 files to utf8;wiemann2005-10-291-3/+4
| | | | | | | removed unnecessary -*- coding -*- tags; made some source files ASCII only git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@3968 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* made _stylesheet_required setting default to 0,wiemann2005-08-241-2/+1
| | | | | | activating it in the rst2html.py front-end tool git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@3830 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Added ``_stylesheet_required`` internal setting, ↵goodger2005-06-281-1/+2
| | | | | | docutils.transforms.html.StylesheetCheck transform, docs, tests, and support. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@3617 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* executablegoodger2005-06-241-0/+0
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@3574 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* separated different types of testsgoodger2005-06-231-0/+35
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@3570 929543f6-e4f2-0310-98a6-ba3bd3dd1d04