summaryrefslogtreecommitdiff
path: root/docutils/test/test_readers
Commit message (Collapse)AuthorAgeFilesLines
* Fix IndexError when running individual test modules under Python <3.9milde2022-11-263-3/+3
| | | | | | | | | 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-253-5/+25
| | | | | | | | 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-243-3/+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
* Inline ``PEPParserTestSuite``aa-turner2022-11-082-12/+43
| | | | | | | - Move all usages of ``PEPParserTestSuite.generateTests`` to using subtests, as part of the test suite refactoring project git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9225 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Subclass directly from ``unittest.TestCase``aa-turner2022-10-211-2/+3
| | | | 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-213-6/+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-215-31/+3
| | | | | | | | | | | | 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
* Update PEP base URL and template.milde2022-03-131-7/+7
| | | | | | | | | | | | | | The canonical PEP base URL changed to "peps.python.org/". The PEP-writer template.txt added a "source" link that no longer works due to sources now only be stored on github and having two possible file extensions ("txt" or "rst"). Adapt the header to resemble the header of official PEP documents (which are now produced using Sphinx). Fixes [bug:#445]. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9045 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Remove unused local variablesmilde2022-03-051-2/+3
| | | | | | | | flake rule F841: local variable 'foo' is assigned to but never used In test_odt.py, a no-op class definition is removed completely. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9038 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Remove unused imports.milde2022-03-055-5/+5
| | | | | | 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-042-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
* Simplify/modernise tests for exceptions and warnings.milde2022-02-211-2/+2
| | | | | | | | | | Use unicode.assertWarnsRegex() instead of "hand written" warnings catching. Use unicode.assertRaises() as context manager (unless this would mean an additional code line). git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9011 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Update base URL config settings defaults.milde2022-01-211-12/+12
| | | | | | | | | The default values for the "pep-references", "rfc-base-url", and "python-home" `configuration settings`_ now uses the "https:" scheme. Based on a patch by Adam Turner. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8960 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Change http://docutils.sf.net -> https://docutils.sourceforge.iomilde2022-01-201-3/+3
| | | | | | Patch by Adam Turner. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8954 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Remove 2.7-compatibility __future__ imports.milde2022-01-033-6/+3
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8925 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Change default value for the "auto_id_prefix" setting to "%".milde2021-06-181-2/+2
| | | | | | | Auto-generated IDs use the tag name as prefix. Set auto_id_prefix_ to "id" if you want unchanged auto-IDs. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8771 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Restore support for running tests stand-alone.milde2020-01-313-3/+9
| | | | | | | | | 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-263-4/+8
| | | | | | | | 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 [ 233 ] Change the base URL for the :rfc: role.milde2015-02-171-5/+5
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7793 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* FIX : forgott tests to __import__ patchgrubert2012-08-271-0/+32
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7504 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Move the orphaned python source reader to the sandbox.milde2010-12-078-1276/+0
| | | | | | | | | | The "python" reader is no longer maintained and (in its current form) does not work with Python 3. Documentation from RST docstrings can be generated with the Sphinx "autodoc" extension (http://sphinx.pocoo.org/latest/ext/autodoc.html). git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@6495 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* fix testing under py3kmilde2010-05-071-4/+1
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@6320 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Ensure test work as intended in all supported Python versions.milde2010-03-181-1/+4
| | | | | | | | Take care to prevent false positives caused by varying error messages or default behaviour. Extend test support to p3k. Fixes [2972615]. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@6268 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Prepare for python 3.0: minimize "types" module where possible (gbrandl).grubert2008-11-301-2/+1
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@5738 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* use $Id$ instead of $Date$ and $Revision$;wiemann2006-05-215-20/+10
| | | | | | | | 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 pep_file_url_template setting; corrected PEP urls (removed .html); ↵goodger2006-03-231-7/+7
| | | | | | restored warning comment to HTML output git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@4445 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* updated tests for revision 4443 (support for new python.org and pep2pyramid.py)goodger2006-03-231-7/+7
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@4444 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* fixed false assumption about pathgoodger2005-06-173-3/+3
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@3509 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* merged rev. 3094:3101 and 3102:HEAD from branches/multiple-ids to trunkwiemann2005-03-262-12/+12
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@3129 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* set executable bits on test fileswiemann2005-03-225-0/+0
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@3085 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* updatedgoodger2004-06-161-4/+4
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@2288 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* updatedwiemann2004-06-051-3/+3
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@2223 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Verifying that external targets are truly targets and not indirectmmgilbe2004-03-231-1/+1
| | | | | | | | references. This is because we are now adding a "name" attribute to references in addition to targets. Note sure if this is correct! git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@1882 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* * Bug fixes to python readerianbicking2004-03-231-267/+511
| | | | | | | | * Getting tests up-to-date * Trimming unused nodes from pynodes git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@1876 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* updatedgoodger2003-01-101-1/+1
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@1090 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* redundant; CVSROOT/cvsignore is globalgoodger2003-01-013-3/+0
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@1048 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* updatedgoodger2002-12-291-3/+36
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@1046 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* added currently breaking expressionrichard2002-12-191-0/+15
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@1034 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Added classes & methods.goodger2002-12-191-0/+158
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@1032 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* a tool for exploring module documentation trees generated bygoodger2002-12-191-0/+33
| | | | | | | ``docutils.readers.python.moduleparser.parse_module()`` git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@1031 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* More progress; functions done.goodger2002-12-181-45/+73
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@1027 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* making good progressgoodger2002-12-143-145/+335
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@1020 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* updatedgoodger2002-12-123-34/+78
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@1016 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* added stdin input capabilitygoodger2002-12-073-15/+33
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@1001 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* a tool for exploring abstract syntax trees generated by ↵goodger2002-12-061-0/+34
| | | | | | ``tokenize.generate_tokens()`` git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@999 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* a tool for exploring abstract syntax trees generated by ``parser.suite()``goodger2002-12-061-0/+42
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@998 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* a tool for exploring abstract syntax trees generated by ``compiler.parse()``goodger2002-12-061-0/+51
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@997 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Tests for docutils/readers/python/moduleparser.py. Tests that don't pass ↵goodger2002-12-051-0/+321
| | | | | | yet are commented out. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@995 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* initial checkingoodger2002-12-053-0/+73
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@991 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* addedgoodger2002-12-051-0/+1
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@988 929543f6-e4f2-0310-98a6-ba3bd3dd1d04