summaryrefslogtreecommitdiff
path: root/docutils/test/functional/tests
Commit message (Collapse)AuthorAgeFilesLines
* Drop default settings from individual functional test files.milde2022-11-1633-883/+277
| | | | | | | | | Define common defaults for all functional tests in `test_functional.py`. Only specify settings that differ from the default/fallback value in the individual test files. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9249 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Remove ``_test_more`` supportaa-turner2022-10-272-53/+17
| | | | | | | This was only used in one test and complicated the functional testing logic. Testing extra items should be done in independent tests. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9182 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Inline ``_default`` in functional testsaa-turner2022-10-2734-10/+462
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9180 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Inline ``_standalone_rst_defaults`` in functional testsaa-turner2022-10-2711-36/+70
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9179 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Add encoding arguments when opening files.milde2022-06-1510-10/+20
| | | | | | | | | | | | | Specify intended incoding, when possible. Avoids `EncodingWarning` in PEP 597 and nasty surprises if the default encoding is not what the user expects. Keep encoding unspecified where this may be an API change. Based on patch by Adam Turner. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9072 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Fix some problems with HTML5 stylesheets. Add tests for "tuftig.css".milde2022-06-131-0/+18
| | | | | | | Ignore footnote back-references, when copying from Firefox. Small tweaks for tuftig.css. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9070 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Fix imports.milde2022-03-051-3/+3
| | | | | | | | flake8 rules E401: multiple imports on one line E402: module level import not at top of file git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9027 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Ensure 2 blank lines around top-level functions and classes.milde2022-03-041-0/+2
| | | | | | | | 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
* Ensure at least two spaces before inline comment.milde2022-03-041-1/+1
| | | | | | | | | flake 8 rule E261 Exceptions for modules sheduled for removal or with 3rd-party origin and for data collections. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9021 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Fix code indentationmilde2022-01-293-6/+3
| | | | | | | | | | | | | | | | | | | | 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
* Fix trailing whitespace (flake warnings W293, W391).milde2022-01-292-4/+0
| | | | | | | W293 blank line contains whitespace W391 blank line at end of file git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8993 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Fix trailing whitespace (flake warning W291).milde2022-01-293-3/+3
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8992 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Fix behaviour of get_stylesheet_list()milde2021-11-171-4/+5
| | | | | | | Do not look up stylesheets given as "stylesheet" setting. Cf. bug #434. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8891 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Add DeprecationWarnings and FutureWarnings for planned changes.milde2021-11-0515-3/+30
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8880 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* relative stylesheet_dirs to make test passgrubert2021-10-051-0/+3
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8844 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* LaTeX writer: New algorithm for table colum widths. Fixes bug #422.milde2021-09-301-0/+1
| | | | | | | | | | | | New configuration setting "legacy_column_widths" for backwards compatibility. Only write "continued on next page..." if it fits without making the table columns wider. Table `width` option overrides conflicting "auto" column `widths`. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8835 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Minor test fixes.milde2021-09-202-5/+0
| | | | | | | | | Remove workaround for legacy versions of the "hyperref" LaTeX package. Remove spurious import. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8830 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* LaTeX writer: code cleanup and small fixes.milde2021-09-111-0/+2
| | | | | | | | | | | Fix newlines after/before ids_to_labels() (cf. patch #183). Refactor/revise ToC writing. Don't write `\phantomsection`, if a local ToC is skipped. Functional test for "--use-docutils-toc" in XeTeX writer test). git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8824 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Simplify functional test settings_overrides.milde2021-07-196-18/+17
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8803 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* HTML5: add self-link after section headings (feature request #28).milde2021-07-052-1/+2
| | | | | | | | | | | | The "section_self_link" setting triggers this behaviour. As it is currently only implemented for HTML5, the setting is defined for this writer only. The self-link "invisible" by default. The provided stylesheet "responsive.css" gives an example how it can be made visible when hovering over the section heading. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8788 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* HTML5: small tweaksmilde2021-07-052-2/+8
| | | | | | | | | | | | | Move space character between section number and heading into "sectnum" span. Simplify code in _html_base.py. responsive.css: highlight target of current URL, show an arrow when hovering over section heading to hint at the target of toc-backlinks. Test setting `--toc_backlinks=top` and the "responsive.css" stylesheet. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8787 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* HTML5: Improve accessibility of section headings.milde2021-06-303-32/+13
| | | | | | | | | | | | | | | | Mark the internal back-refences from section headings to the ToC with DPub-ARIA role "doc-backref". Use "aria-level" instead of a class argument value for section headings with nesting level > 6 (for level 1 to 6, the level is determined by the HTML tag). Mind that in HTML5, heading level 1 is reserved for the document title and section headings start with level 2. Add functional test sample for deeply nested sections. Merge functional tests for additonal HTML5 features. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8786 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Reorganise functional tests.milde2021-06-301-3/+3
| | | | | | | | | | | 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
* MathML: First part of fix to #407.milde2021-05-201-1/+1
| | | | | | | Partially fix #407 "Inline MathML role and block MathML directive appear with reversed styles." git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8736 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Default of "legacy_class_functions" setting changed to "False".milde2021-05-187-6/+3
| | | | | | | | - The setting `legacy_class_functions`_ now defaults to "False". - latex2e/docutils.sty: Fix excessive padding above sidebar titles. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8728 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* specify stylesheet_dirs for embed_images_html5 patch#180grubert2021-04-041-0/+4
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8662 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* HTML5 writer: support <video>.milde2021-03-201-0/+14
| | | | | | Use <video> for images with video MIME types supported by HTML5. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8639 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* latex-writer: add \\leavevmode after term or field name if required.milde2021-02-181-0/+10
| | | | | | Based on patch #176 by John Thorvald Wodder II git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8626 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Implement feature request #40 Option to embed images as data URI.milde2020-11-271-0/+14
| | | | | | | | | | | | | | | If the new "embed_image" configuration setting is true, the image can be read from the local file system, and its MIME type can be determined, it is base64 encoded and included as a data URI. TODO: * Add an "embed" option to the "image" directive to allow embedding of individual images? * Use direct inlinging for SVG in HTML5? git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8581 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* LaTeX package/stylesheet for Docutils.milde2020-08-286-5/+21
| | | | | | | | | | | New LaTeX style file with required Docutils-specific definitions. This file will also be published on CTAN. When "docutils.sty" is not found in the "stylesheet" setting(s), the LaTeX writer will insert required code into the document preamble (like up to this commit). git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8545 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* disable pygments by defaultgrubert2020-08-101-0/+2
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8532 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Support the `memoir` LaTeX document class.milde2020-07-101-0/+14
| | | | | | Fixes #390, #391, and #392. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8523 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* tests/functional: Set "auto_id_prefix" to "%" (expands to tag-names).milde2019-11-151-0/+1
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8414 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* trivial: Misc whitespace fixesmilde2019-08-271-1/+1
| | | | | | Signed-off-by: Stephen Finucane <stephen@that.guru> git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8376 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Fix: ResourceWarning: unclosed file python3.8 (partial bug 377)grubert2019-08-2010-10/+20
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8327 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Rename files to care for case-insensitive file systems.milde2017-10-201-1/+1
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8189 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Fixes and test for literal block handling in LaTeX.milde2017-09-225-0/+69
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8180 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Fix [ 319 ] MathJax CDN shut down on April 30, 2017. milde2017-06-161-3/+2
| | | | | | | | 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
* Fix tests after renaming html5 writer.milde2016-08-193-6/+6
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7970 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Rename html_plain writer to html5_polyglott.milde2016-08-182-3/+3
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7969 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* docutils-xml writer: Fix/improve output with "newlines and "indent".milde2016-08-181-0/+15
| | | | | | | | | | | xmllint says empty elements must not have linebreaks inbetween (regards transition, image and cospec elements). Indent text, unless it is FixedText (literal etc.). Add a functional test for docutils-xml. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7966 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* LaTeX writer tests for multirow tables.milde2016-07-261-0/+10
| | | | | | | Also some more corner case test for LaTeX. (Functional test, so that the visual appearence in PDF can be easily checked.) git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7950 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* html-plain: style footnote references and labels with CSS.milde2015-09-111-0/+14
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7916 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Add test for html-plain writer.milde2015-07-161-0/+15
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7902 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Rename html_base writer to html_plain, move xhtml11 writer back to sandbox.milde2015-07-162-18/+2
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7901 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* XHTML does not allow "math" directly in "pre". Wrap in "span".milde2015-04-131-1/+1
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7866 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Base xhtml11 writer on html-base. Adapt and fix tests.milde2015-03-102-5/+3
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7818 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Use xhtml writer for MathML test: produce valid XHTML+MathML document.milde2015-03-101-3/+3
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7813 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* New CSS 2.1 style-sheet for xhtml11 writer.milde2015-03-061-2/+2
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7809 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* New HTML writer generating `XHTML1.1`_ styled with CSS2.milde2015-02-211-0/+18
| | | | | | | | Moved to the docutils core from sandbox/html4strict. .. _XHTML1.1: http://www.w3.org/TR/xhtml11/ git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7798 929543f6-e4f2-0310-98a6-ba3bd3dd1d04