summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* Prefer ``contextlib.chdir`` to ``sphinx.util.osutil.cd``Adam Turner2023-03-054-8/+25
|
* Update tests for Babel 2.12 (CLDR 42)Adam Turner2023-03-051-2/+11
|
* Resolve lint errors from Ruff 0.0.254Adam Turner2023-03-052-2/+2
|
* Resolve ``flake8-return`` errorsAdam Turner2023-02-183-0/+4
|
* Unescape quotation marks where possibleAdam Turner2023-02-185-8/+8
|
* Fix pytest style issuesAdam Turner2023-02-1816-71/+44
|
* Avoid ``unittest.TestCase`` methodsAdam Turner2023-02-184-294/+295
|
* Prefer ``@pytest.fixture()``Adam Turner2023-02-187-16/+16
|
* Fix COM812Adam Turner2023-02-1821-139/+139
|
* Add ``content_offset`` parameter to ``nested_parse_with_titles`` (#11147)Jeremy Maitin-Shepard2023-02-154-0/+56
| | | | | | | | | | | | | | | | | | | | | | | Previously, ``nested_parse_with_titles`` always passed ``0`` as the input offset when invoking ``nested_parse``. When parsing the content of a directive, as is a common use case for ``nested_parse_with_titles``, this leads to incorrect source file/line number information, as it does not take into account the directive's ``content_offset``, which is always non-zero. This issue affects *all* object descriptions due to GH-10887. It also affects the ``sphinx.ext.ifconfig`` extension. The ``py:module`` and ``js:module`` directives employed a workaround for this issue, by wrapping the calls to ``nested_parse_with_title`` with ``switch_source_input``. That worked, but was more complicated (and likely less efficient) than necessary. This commit adds an optional ``content_offset`` parameter to ``nested_parse_with_titles``, and fixes callers to pass the appropriate content offset when needed. This commit eliminates the now-unnecessary calls to ``switch_source_input`` and instead specifies the correct ``content_offset``.
* Restore correct parallel search index building (#11192)Jeremy Maitin-Shepard2023-02-151-0/+7
| | | | | | | | | | | | Revert b32841e153431ec02de31e9ec32e79ab3ac7d1c2 to fix parallel search index building The image-related changes were already reverted in 2a7c40d07f4b0e0fd2a4bc942e74634c2df24dee, but the search index changes also need to be reverted. It would be nice to support parallel search index building, but the necessary support for merging the search indices produced by each process needs to be added first.
* Treat Python warnings as errors during testingAdam Turner2023-02-152-2/+7
|
* Fix Ruff bidirectional text errorsAdam Turner2023-02-111-2/+5
|
* Skip sphinx.locale.init_console when running tests (#11159)Jean Abou-Samra2023-01-311-0/+14
| | | | | | | Tests for Sphinx's CLIs, like test_apidoc, indirectly init_console to initialize translations for Sphinx's console domain, the one with Sphinx's log messages. This bleeds over subsequent tests by making warnings translated. Fix this by skipping init_console when running Sphinx's test suite.
* Fix various Ruff errorsAdam Turner2023-01-312-5/+5
|
* Update test_config.py::test_needs_sphinx for Alabaster 0.7.13 compatJean-François B2023-01-211-7/+7
| | | | Relates #11145
* Merge branch '6.1.x'Adam Turner2023-01-104-19/+3
|\ | | | | | | | | | | # Conflicts: # CHANGES # sphinx/__init__.py
| * Undo parallel image changesAdam Turner2023-01-104-19/+3
| |
* | Fix #11079 (LaTeX: figure with align disappears if not followed by text)Jean-François B2023-01-081-3/+6
| |
* | Adopt ``profile = "black"`` for ``isort``Adam Turner2023-01-0717-46/+185
|/ | | | This allows using Ruff's import sorting fixers
* Fix copying images under parallel execution (#11100)Adam Turner2023-01-074-0/+82
|
* LaTeX: fix 5.1.0 bugs related to topic and contents boxes (#11102)Jean-François B2023-01-061-0/+72
| | | | | | | | | | | | | | | | | | * Fix #11095 (PDF wrong placement of shadow of topic boxes since 5.1.0) * Fix #11096 (LaTeX shadowsize regression at 5.1.0) * Fix #11099 (shadowrule legacy sphinxsetup key vanished at 5.1.0) * Fix #11101 (LaTeX div.topic_padding of sphinxsetup had wrong name) * Add some checks that various sphinxsetup keys do not break PDF build * Update LaTeX docs * Update CHANGES * Can not use :dudir:`contents` has it links to wrong place
* Suppress ``ValueError`` in ``apply_source_workaround`` (#11092)Adam Turner2023-01-051-2/+22
|
* Cache doctrees more efficientlyAdam Turner2023-01-044-5/+6
|
* Move XML Name pattern to ``epub3``Adam Turner2023-01-032-8/+9
|
* Move console output utilities to ``sphinx.util.display``Adam Turner2023-01-032-84/+93
| | | | | - Merge `old_status_iterator` into ``status_iterator``. ``old_status_iterator`` was deprecated in version 1.6.
* Fix #6744: support for seealso directive should be via an environmentJean-François B2023-01-031-0/+11
|
* Document ``typing.NewType`` as a class (#10700)Adam Turner2023-01-025-73/+73
|
* Use PEP 604 display for ``typing.Optional`` and ``typing.Union`` (#11072)Adam Turner2023-01-025-163/+169
|
* Rewrite IndexBuilder loadingAdam Turner2023-01-021-1/+8
|
* Run pyupgrade (#11070)Adam Turner2023-01-0215-70/+64
|
* Remove obsolete HTML keyword ``link rel="shortcut"`` (#11069)Rotzbua2023-01-011-1/+1
| | | | | | | The link relationship keyword `shortcut` does not appear in the HTML 5 specification [1]. It was used by historic browsers (i.e. Internet Explorer 6) which Sphinx no longer supports. [1]: HTML5 Specification, 4.6.7.8 Link type "icon", https://html.spec.whatwg.org/#rel-icon
* Insert ``from __future__ import annotations``Adam Turner2023-01-0121-5/+46
|
* Happy New Year!Adam Turner2023-01-011-1/+1
|
* Make copyright text inclusion test date-independentAdam Turner2023-01-012-2/+2
| | | | Improve clarity on what the test is looking for in the footer
* Merge branch '6.0.x'Adam Turner2023-01-012-10/+28
|\
| * Fix tests for Pygments 2.14Adam Turner2023-01-012-10/+28
| | | | | | | | | | | | Pygments 2.14 was released on 01/01/2023 [0] [0]: https://pygments.org/docs/changelog/#version-2-14-0
* | Reflect changes to ``Enum`` signature in Python 3.12Adam Turner2022-12-301-1/+4
| |
* | Add test for multi-word key names (``kbd`` role) (#10765)John Gardner2022-12-301-0/+8
| |
* | Factor out HTML 4 translator (#11051)Adam Turner2022-12-304-18/+18
| | | | | | Move the HTML 4 translator into a private module.
* | Enable Ruff's pylint 'PLC2201' checkAdam Turner2022-12-306-109/+117
| | | | | | | | Address all cases where the comparison order check is violated
* | Enable Ruff's flake8-bandit checksAdam Turner2022-12-291-4/+4
| |
* | Enable Ruff's pylint checksAdam Turner2022-12-291-1/+0
| | | | | | | | | | Also fix two PLW0602 warnings (``global`` without assignment) and five PLW0120 warnings (else clause on loop without break).
* | Adopt the Ruff code linting toolAdam Turner2022-12-291-1/+1
|/ | | | https://github.com/charliermarsh/ruff
* Add test coverage for 'today_fmt' reference substitution (#10980)James Addison2022-12-292-0/+11
|
* remove blanket 'noqas'Daniel Eades2022-12-166-8/+8
|
* Deactivate (provisorily) Python12-dev testing (#11035)Jean-François B2022-12-161-1/+1
| | | | | | | | | | | | | * fix flake8 warnings * Deactivate (provisorily) testing with 3.12-dev (refs: https://github.com/sphinx-doc/sphinx/pull/10995#issuecomment-1330310586 ) * Escape # in tox.ini for tox 4 compatibility ('du-latest' tests) Co-authored-by: Daniel Eades <danieleades@hotmail.com>
* Run the ``pyupgrade`` toolAdam Turner2022-10-1731-75/+68
|
* Prefer ``raise SystemExit`` to ``sys.exit``Adam Turner2022-10-172-6/+2
|
* LaTeX: switch to some nicer defaults for tables and code-blocks (#10924)Jean-François B2022-10-171-5/+7
|