SF.net SVN: docutils:[9957 ] trunk
milde--- via Docutils-checkins <[email protected]>
| Newsgroups | gmane.text.docutils.cvs |
|---|---|
| Message-ID | <[email protected]> |
Revision: 9957
http://sourceforge.net/p/docutils/code/9957
Author: milde
Date: 2024-10-21 07:20:00 +0000 (Mon, 21 Oct 2024)
Log Message:
-----------
Catch deliberate system messages when running the test suite.
When we know a test case triggers a system message,
make sure that it does not clutter the output.
System messages that are only printed to the warning stream may
be checked in an `assertRaisesRegex()` block after setting the "halt_level"
configuration setting to a matching level (cf. e.g. "test_nodes.py"
or the "test/*/test_*_misc.py" test modules).
Modified Paths:
--------------
trunk/.flake8
trunk/docutils/.flake8
trunk/docutils/test/test_writers/test_manpage.py
Modified: trunk/.flake8
===================================================================
--- trunk/.flake8 2024-10-20 19:45:21 UTC (rev 9956)
+++ trunk/.flake8 2024-10-21 07:20:00 UTC (rev 9957)
@@ -72,7 +72,7 @@
docutils/test/test_transforms/*:E122,E124,E128,E501
docutils/test/test_writers/*:E122,E124,E128,E501
# test output contains trailing whitespace, long lines, operator at end
- docutils/test/test_writers/test_manpage.py:E128,W291,E501,W504
+ docutils/test/test_writers/test_manpage.py:E122,E128,W291,E501,W504
exclude =
.venv
Modified: trunk/docutils/.flake8
===================================================================
--- trunk/docutils/.flake8 2024-10-20 19:45:21 UTC (rev 9956)
+++ trunk/docutils/.flake8 2024-10-21 07:20:00 UTC (rev 9957)
@@ -72,7 +72,7 @@
test/test_transforms/*:E122,E124,E128,E501
test/test_writers/*:E122,E124,E128,E501
# test output contains trailing whitespace, long lines, operator at end
- test/test_writers/test_manpage.py:E128,W291,E501,W504
+ test/test_writers/test_manpage.py:E122,E128,W291,E501,W504
exclude =
.venv
Modified: trunk/docutils/test/test_writers/test_manpage.py
===================================================================
--- trunk/docutils/test/test_writers/test_manpage.py 2024-10-20 19:45:21 UTC (rev 9956)
+++ trunk/docutils/test/test_writers/test_manpage.py 2024-10-21 07:20:00 UTC (rev 9957)
@@ -53,6 +53,7 @@
settings_overrides={
'_disable_config': True,
'strict_visitor': True,
+ 'warning_stream': '' # don't print warnings
}).decode()
self.assertEqual(case_expected, output)
@@ -564,7 +565,8 @@
# TODO check we get an INFO not a WARNING
totest['image'] = [
- ["""text
+ ["""\
+text
.. image:: gibsnich.png
:alt: an image of something
@@ -594,7 +596,6 @@
# (WARNING/2) "image" not supported by "manpage" writer.
# Please provide an "alt" attribute with textual replacement.
#
-
totest['image-without-alt'] = [
["""text
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.