| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
- Move all usages of ``exception_data`` to using the ``try`` /
``except`` pattern as part of the test suite refactoring project
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9232 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
| |
This removes the now unused ``StandardTestCase``, ``CustomTestCase``,
and ``CustomTestSuite``.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9231 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
| |
- Move all usages of ``ParserTestSuite.generateTests``
to using subtests, as part of the test suite refactoring project
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9230 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
| |
- Move all usages of ``TransformTestSuite.generateTests``
to using subtests, as part of the test suite refactoring project
- Fix the global state issues with ``test_hyperlinks_de`` and run
the test as part of ``alltests.py``
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9229 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
| |
- Move all usages of ``WriterPublishTestCase`` to using subtests, as
part of the test suite refactoring project.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9228 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
| |
- 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
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9226 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
| |
- 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
|
| |
|
|
|
|
|
| |
- Move all usages of ``GridTableParserTestSuite.generateTests``
to using subtests, as part of the test suite refactoring project
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9224 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
| |
- Move all usages of ``SimpleTableParserTestSuite.generateTests``
to using subtests, as part of the test suite refactoring project
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9223 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
| |
- Move all usages of ``RecommonmarkParserTestSuite.generateTests``
to using subtests.
- Move the conditional test skipping logic to ``__init__.py`` in
``test_recommonmark``, and move the missing module test from
``test_recommonmark.test_misc`` to ``test_get_parser_class``, as
otherwise the test would never run.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9222 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
| |
While setting "output-encoding" to "unicode" ensures that
core.publish_string() returns a `str` instance,
it has also effects an eventual encoding declaration (XML, HTML, LaTeX)
and character conversions (LaTeX).
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9218 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
``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
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9195 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9194 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9192 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9189 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9187 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9185 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9184 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9174 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9173 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9172 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9170 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9169 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9168 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
To debug a specific test, use the facilities provided by ``unittest``
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9166 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9165 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9158 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
| |
In ``CustomTestCase``, pass ``suite_settings`` directly to
``test_case_class`` rather than altering ``kwargs``.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9156 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9154 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9151 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9148 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9147 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9145 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
| |
The working directory is set to ``testroot`` in the initialisation
of ``DocutilsTestSupport``, meaning we do not need to set it to the
same directory in each test.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9144 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9143 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
New interface function: frontend.get_default_settings()
easy access to default settings for programmatic use.
Add deprecation warnings.
Catch them when accessing the deprecated functions from Docutils.
Make docstrings conform to the Documentation Policies
(first line: summary, next line empty).
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9047 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
| |
flake8 rule F401
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9037 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
| |
Breaking before binary operators is the recommended style
in PEP 8 (changed in April 2016).
flake8 rule W504
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9035 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
| |
flake8 rule E722
Exception: as catchall, if
* the right thing to do does not depend on the error
* any error is reported or risen again.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9033 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
| |
flake8 rule E501: line too long (N > 79 characters)
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9030 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
Patch by Adam Turner.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8984 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8979 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|