| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Reword and wrap warning message for incompatible content
of the bibliographic field "author".
Adapt "frontmatter" unit test cases.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9351 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9350 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
| |
The test for "single line paragraphs" failed for bibliographic fields followed
by an empty line.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9348 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
More detailled feedback when extracting data from a bibliographic field fails.
In bibliographic fields expecting a single paragraph (e.g. "author"),
restore enumerated lists originating in ambiguous markup like
"A. Einstein" (name with initial): in the given context, an we know that this
should not be an enumeration, so fixing is better than throwing an error.
Fix some cases of "ersatz" Boolean values from pre Python 2.3 times.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9322 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also restructure `test_docinfo` to reduce code duplication.
Running "transform" test modules independently failed due to an additional
INFO message:
Loading a language module results in an INFO message. Import statements
don't trigger the INFO message if the language module is already loaded.
When running a test module as __main__, the INFO message is added to the
first document using both, the language module and the `Messages` or
`TestMessages` transform. When running the test suite, the language
module may already be loaded by another test.
For stable results, the optional message must be filtered.
In "transform" tests, we do not load the default transforms, so
INFO messages are only filtered if `FilterMessages` is explicitly added.
As `FilterMessages` only acts on attached messages, it must run
*after* `TestMessages`, therefore we load it with custom priority 890.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9321 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clean the global caches to ensure predictable test results.
(There were additional warnings for undefined directive and
role names under Windows. These were suppressed due to other
tests adding canonical names to the cache under Linux.)
Add additional warnings to the expected output samples.
Registering directives at test module level no longer works.
Move `register_directive()` call to the test function.
Signed-off-by: milde <milde@users.sf.net>
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9265 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the minimal configuration required for the test suite to
pass using the pytest framework. This is part of the test suite
refactoring project.
- Ignore two classes that start with the word "Test"
- Provide the standard test header to pytest
- Update the documentation
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9237 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
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9169 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
| |
unittest migration.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9141 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
flake8 rule F401
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9037 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
|
|
|
|
|
|
| |
flakei rule E303: too many blank lines (N)
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9025 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 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Flake rules
E201 whitespace after '('
E202 whitespace before '}'
E203 whitespace before ':'
E211 whitespace before '('
Exception: : as binary operator in extended slices
(cf. https://www.python.org/dev/peps/pep-0008/#pet-peeves).
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9015 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
|
|
|
| |
The "Messages" transform no longer tests for to-be-ignored messages
but inserts all `system-messages` without parent into a
"System Messages" section.
This allows the "FilterMessages" transform to find and convert
matching `problematic` nodes (but now it also has to remove the
"System Messages" section if empty).
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8997 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8992 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8983 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
| |
Found by Tomasz Kłoczko running "pytest" (cf. feature-request #81)
and by running `python3 -W all alltests.py`.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8933 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
| |
Use "python3" in the shebang line
(cf. PEP 394 -- The "python" Command on Unix-Like Systems).
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8927 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
| |
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
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8925 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
| |
Testing with "alltests.py" is currently impossible due to
caching (see itest_hyperlinks_de.py)
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8831 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mitigate the danger of DoS attacs using
specially crafted rST input (cf. bug #381).
The default value of 10 000 characters should suffice for
legitimate use cases (e.g. long paragraphs in auto-wrapping editors
or extensive creative use of substitutions).
Applications processing untrusted rST might wish to lower this
limitation (together with other safety measures described in
docs/howto/security.txt).
Unsupervised processing of untrusted rST input should always
be safeguarded with limits on processing time and memory use.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8565 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
| |
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8554 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8469 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
| |
While the current implementation actually returns a list of nodes,
the docstring specifies only: "Return an iterable ...".
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8387 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
| |
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8385 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
Remove all uses of print as a statement. This includes comments, many of
which are simply removed as noise (they're in version control and can be
re-added later, if necessary).
Signed-off-by: Stephen Finucane <stephen@that.guru>
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8346 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
| |
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8311 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
| |
Standard backslash escape for smartquotes.
No escape in roles descending from `inline literal`.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8301 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
|
|
|
| |
Store the null-escaped text in the doctree nodes and unescape in
nodes.Text.astext(). Enables functions and transforms processing Text nodes
to respect backslash escapes.
Provides backslash-escaping of the `author separator` in the "authors"
docinfo field and the `classifier delimiter` in definition list terms.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8284 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
|
| |
Still waiting for review.
Reverts last three commits from a local "feature branch"
unintentionally applied to trunk with `git svn`.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8235 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
| |
Let the smartquote transform take advantage of the
representation of escaping backslashes in the doctree
as null characters.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8234 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
|
|
|
| |
Remove implementation of escaping author-separators in bibliographic fields
that relies on the "rawsource" attribute.
This is not safe (rawsource is only for information and debugging purposes).
A proper fix can be done with null-escaped text in the doctree.
C.f. https://sourceforge.net/p/docutils/bugs/_discuss/thread/c8f86be6/74ed/attachment/null-escape-in-doctree2.patch
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8231 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
| |
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8210 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
| |
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8207 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
| |
Be a bit more verbose when detecting nodes that are disallowed inside
substitution definitions.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8206 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
| |
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8198 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
| |
Use open quote after whitespace, ZWSP, and ZWNJ.
Code cleanup.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8190 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|