From: Michał G. <mgo...@us...> - 2024-04-11 14:48:22
|
--- **[bugs:#485] 0.21.1: `FAIL: test_publish (test_writers.test_html5_polyglot_parts.Html5WriterPublishPartsTestCase.test_publish) (id="totest['image_messages'][0]")`** **Status:** open **Created:** Thu Apr 11, 2024 02:48 PM UTC by Michał Górny **Last Updated:** Thu Apr 11, 2024 02:48 PM UTC **Owner:** nobody This is one more test failure, introduced by a different commit than these reported in #484: ``` ====================================================================== FAIL: test_publish (test_writers.test_html5_polyglot_parts.Html5WriterPublishPartsTestCase.test_publish) (id="totest['image_messages'][0]") ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/docutils/test/test_writers/test_html5_polyglot_parts.py", line 54, in test_publish self.assertEqual(case_expected, self.format_output(parts)) AssertionError: {'fra[318 chars]y: \'dummy.png\'</p>\n</aside>\n<aside class="[620 chars]>\n'} != {'fra[318 chars]y: \'/tmp/docutils/test/dummy.png\'</p>\n</asi[639 chars]>\n'} {'fragment': '<img alt="dummy.png" src="dummy.png" />\n' '<aside class="system-message">\n' '<p class="system-message-title">System Message: WARNING/2 (<span ' 'class="docutils literal"><string></span>, line 1)</p>\n' '<p>Cannot scale image!\n' ' Could not get size from "dummy.png":\n' - " [Errno 2] No such file or directory: 'dummy.png'</p>\n" ? ^ ----------------- + ' [Errno 2] No such file or directory: ' ? ^ + "'/tmp/docutils/test/dummy.png'</p>\n" '</aside>\n' '<aside class="system-message">\n' '<p class="system-message-title">System Message: ERROR/3 (<span ' 'class="docutils literal"><string></span>, line 1)</p>\n' '<p>Cannot embed image "dummy.png":\n' " [Errno 2] No such file or directory: 'dummy.png'</p>\n" '</aside>\n' '<video src="dummy.mp4" title="dummy.mp4">\n' '<a href="dummy.mp4">dummy.mp4</a>\n' '</video>\n' '<aside class="system-message">\n' '<p class="system-message-title">System Message: WARNING/2 (<span ' 'class="docutils literal"><string></span>, line 5)</p>\n' '<p>Cannot scale image!\n' ' Could not get size from "dummy.mp4":\n' ' PIL cannot read video images.</p>\n' '</aside>\n'} ``` Bisected it down to: ``` commit 2d4e66bb87aff0b62c67f3edc9792298dbadff07 Author: milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> Date: Thu Dec 14 22:38:58 2023 +0000 Refactor "_html_base" writer. Auxiliary method `HTMLTranslator.image_size()` to bring `HTMLTranslator.visit_image()` to a reasonable size. Improve/test error reporting when an image file cannot be read. Sort methods in `HTMLTranslator`. Small cleanups and optimizations. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@9501 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 docutils/writers/_html_base.py | 230 ++++++++++++------------- test/test_writers/test_html5_polyglot_misc.py | 4 +- test/test_writers/test_html5_polyglot_parts.py | 72 +++++++- 3 files changed, 181 insertions(+), 125 deletions(-) ``` I can reproduce with Python 3.10.14, 3.11.9, 3.12.3; Pillow 10.3.0, Pygments 2.17.2. --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Günter M. <mi...@us...> - 2024-04-11 16:32:33
|
Thank you for reporting. The failure is in a test in improved reporting of errors/warnings by the html5 writer. It seems like a "false positive" (i.e. just some irrelevant details differ). Could be a change in the missing-file error message in Python 3.10. Can you test with Python 3.9? --- **[bugs:#485] 0.21.1: `FAIL: test_publish (test_writers.test_html5_polyglot_parts.Html5WriterPublishPartsTestCase.test_publish) (id="totest['image_messages'][0]")`** **Status:** open **Created:** Thu Apr 11, 2024 02:48 PM UTC by Michał Górny **Last Updated:** Thu Apr 11, 2024 02:48 PM UTC **Owner:** nobody This is one more test failure, introduced by a different commit than these reported in #484: ``` ====================================================================== FAIL: test_publish (test_writers.test_html5_polyglot_parts.Html5WriterPublishPartsTestCase.test_publish) (id="totest['image_messages'][0]") ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/docutils/test/test_writers/test_html5_polyglot_parts.py", line 54, in test_publish self.assertEqual(case_expected, self.format_output(parts)) AssertionError: {'fra[318 chars]y: \'dummy.png\'</p>\n</aside>\n<aside class="[620 chars]>\n'} != {'fra[318 chars]y: \'/tmp/docutils/test/dummy.png\'</p>\n</asi[639 chars]>\n'} {'fragment': '<img alt="dummy.png" src="dummy.png" />\n' '<aside class="system-message">\n' '<p class="system-message-title">System Message: WARNING/2 (<span ' 'class="docutils literal"><string></span>, line 1)</p>\n' '<p>Cannot scale image!\n' ' Could not get size from "dummy.png":\n' - " [Errno 2] No such file or directory: 'dummy.png'</p>\n" ? ^ ----------------- + ' [Errno 2] No such file or directory: ' ? ^ + "'/tmp/docutils/test/dummy.png'</p>\n" '</aside>\n' '<aside class="system-message">\n' '<p class="system-message-title">System Message: ERROR/3 (<span ' 'class="docutils literal"><string></span>, line 1)</p>\n' '<p>Cannot embed image "dummy.png":\n' " [Errno 2] No such file or directory: 'dummy.png'</p>\n" '</aside>\n' '<video src="dummy.mp4" title="dummy.mp4">\n' '<a href="dummy.mp4">dummy.mp4</a>\n' '</video>\n' '<aside class="system-message">\n' '<p class="system-message-title">System Message: WARNING/2 (<span ' 'class="docutils literal"><string></span>, line 5)</p>\n' '<p>Cannot scale image!\n' ' Could not get size from "dummy.mp4":\n' ' PIL cannot read video images.</p>\n' '</aside>\n'} ``` Bisected it down to: ``` commit 2d4e66bb87aff0b62c67f3edc9792298dbadff07 Author: milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> Date: Thu Dec 14 22:38:58 2023 +0000 Refactor "_html_base" writer. Auxiliary method `HTMLTranslator.image_size()` to bring `HTMLTranslator.visit_image()` to a reasonable size. Improve/test error reporting when an image file cannot be read. Sort methods in `HTMLTranslator`. Small cleanups and optimizations. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@9501 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 docutils/writers/_html_base.py | 230 ++++++++++++------------- test/test_writers/test_html5_polyglot_misc.py | 4 +- test/test_writers/test_html5_polyglot_parts.py | 72 +++++++- 3 files changed, 181 insertions(+), 125 deletions(-) ``` I can reproduce with Python 3.10.14, 3.11.9, 3.12.3; Pillow 10.3.0, Pygments 2.17.2. --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Michał G. <mgo...@us...> - 2024-04-11 17:16:42
|
Same results with 3.9. --- **[bugs:#485] 0.21.1: `FAIL: test_publish (test_writers.test_html5_polyglot_parts.Html5WriterPublishPartsTestCase.test_publish) (id="totest['image_messages'][0]")`** **Status:** open **Created:** Thu Apr 11, 2024 02:48 PM UTC by Michał Górny **Last Updated:** Thu Apr 11, 2024 04:32 PM UTC **Owner:** nobody This is one more test failure, introduced by a different commit than these reported in #484: ``` ====================================================================== FAIL: test_publish (test_writers.test_html5_polyglot_parts.Html5WriterPublishPartsTestCase.test_publish) (id="totest['image_messages'][0]") ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/docutils/test/test_writers/test_html5_polyglot_parts.py", line 54, in test_publish self.assertEqual(case_expected, self.format_output(parts)) AssertionError: {'fra[318 chars]y: \'dummy.png\'</p>\n</aside>\n<aside class="[620 chars]>\n'} != {'fra[318 chars]y: \'/tmp/docutils/test/dummy.png\'</p>\n</asi[639 chars]>\n'} {'fragment': '<img alt="dummy.png" src="dummy.png" />\n' '<aside class="system-message">\n' '<p class="system-message-title">System Message: WARNING/2 (<span ' 'class="docutils literal"><string></span>, line 1)</p>\n' '<p>Cannot scale image!\n' ' Could not get size from "dummy.png":\n' - " [Errno 2] No such file or directory: 'dummy.png'</p>\n" ? ^ ----------------- + ' [Errno 2] No such file or directory: ' ? ^ + "'/tmp/docutils/test/dummy.png'</p>\n" '</aside>\n' '<aside class="system-message">\n' '<p class="system-message-title">System Message: ERROR/3 (<span ' 'class="docutils literal"><string></span>, line 1)</p>\n' '<p>Cannot embed image "dummy.png":\n' " [Errno 2] No such file or directory: 'dummy.png'</p>\n" '</aside>\n' '<video src="dummy.mp4" title="dummy.mp4">\n' '<a href="dummy.mp4">dummy.mp4</a>\n' '</video>\n' '<aside class="system-message">\n' '<p class="system-message-title">System Message: WARNING/2 (<span ' 'class="docutils literal"><string></span>, line 5)</p>\n' '<p>Cannot scale image!\n' ' Could not get size from "dummy.mp4":\n' ' PIL cannot read video images.</p>\n' '</aside>\n'} ``` Bisected it down to: ``` commit 2d4e66bb87aff0b62c67f3edc9792298dbadff07 Author: milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> Date: Thu Dec 14 22:38:58 2023 +0000 Refactor "_html_base" writer. Auxiliary method `HTMLTranslator.image_size()` to bring `HTMLTranslator.visit_image()` to a reasonable size. Improve/test error reporting when an image file cannot be read. Sort methods in `HTMLTranslator`. Small cleanups and optimizations. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@9501 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 docutils/writers/_html_base.py | 230 ++++++++++++------------- test/test_writers/test_html5_polyglot_misc.py | 4 +- test/test_writers/test_html5_polyglot_parts.py | 72 +++++++- 3 files changed, 181 insertions(+), 125 deletions(-) ``` I can reproduce with Python 3.10.14, 3.11.9, 3.12.3; Pillow 10.3.0, Pygments 2.17.2. --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Günter M. <mi...@us...> - 2024-04-11 20:33:37
|
It may be a false positive (or a sign of a problem) due to relative path handling (`utils.relative_path()`, `writers._html_base.Translator.uri2imagepath()`... What directory do you start the test from? What is the result with cd /tmp/docutils/ test/alltests.py vs. cd / /tmp/docutils/test/alltest.py ? --- **[bugs:#485] 0.21.1: `FAIL: test_publish (test_writers.test_html5_polyglot_parts.Html5WriterPublishPartsTestCase.test_publish) (id="totest['image_messages'][0]")`** **Status:** open **Created:** Thu Apr 11, 2024 02:48 PM UTC by Michał Górny **Last Updated:** Thu Apr 11, 2024 05:16 PM UTC **Owner:** nobody This is one more test failure, introduced by a different commit than these reported in #484: ``` ====================================================================== FAIL: test_publish (test_writers.test_html5_polyglot_parts.Html5WriterPublishPartsTestCase.test_publish) (id="totest['image_messages'][0]") ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/docutils/test/test_writers/test_html5_polyglot_parts.py", line 54, in test_publish self.assertEqual(case_expected, self.format_output(parts)) AssertionError: {'fra[318 chars]y: \'dummy.png\'</p>\n</aside>\n<aside class="[620 chars]>\n'} != {'fra[318 chars]y: \'/tmp/docutils/test/dummy.png\'</p>\n</asi[639 chars]>\n'} {'fragment': '<img alt="dummy.png" src="dummy.png" />\n' '<aside class="system-message">\n' '<p class="system-message-title">System Message: WARNING/2 (<span ' 'class="docutils literal"><string></span>, line 1)</p>\n' '<p>Cannot scale image!\n' ' Could not get size from "dummy.png":\n' - " [Errno 2] No such file or directory: 'dummy.png'</p>\n" ? ^ ----------------- + ' [Errno 2] No such file or directory: ' ? ^ + "'/tmp/docutils/test/dummy.png'</p>\n" '</aside>\n' '<aside class="system-message">\n' '<p class="system-message-title">System Message: ERROR/3 (<span ' 'class="docutils literal"><string></span>, line 1)</p>\n' '<p>Cannot embed image "dummy.png":\n' " [Errno 2] No such file or directory: 'dummy.png'</p>\n" '</aside>\n' '<video src="dummy.mp4" title="dummy.mp4">\n' '<a href="dummy.mp4">dummy.mp4</a>\n' '</video>\n' '<aside class="system-message">\n' '<p class="system-message-title">System Message: WARNING/2 (<span ' 'class="docutils literal"><string></span>, line 5)</p>\n' '<p>Cannot scale image!\n' ' Could not get size from "dummy.mp4":\n' ' PIL cannot read video images.</p>\n' '</aside>\n'} ``` Bisected it down to: ``` commit 2d4e66bb87aff0b62c67f3edc9792298dbadff07 Author: milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> Date: Thu Dec 14 22:38:58 2023 +0000 Refactor "_html_base" writer. Auxiliary method `HTMLTranslator.image_size()` to bring `HTMLTranslator.visit_image()` to a reasonable size. Improve/test error reporting when an image file cannot be read. Sort methods in `HTMLTranslator`. Small cleanups and optimizations. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@9501 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 docutils/writers/_html_base.py | 230 ++++++++++++------------- test/test_writers/test_html5_polyglot_misc.py | 4 +- test/test_writers/test_html5_polyglot_parts.py | 72 +++++++- 3 files changed, 181 insertions(+), 125 deletions(-) ``` I can reproduce with Python 3.10.14, 3.11.9, 3.12.3; Pillow 10.3.0, Pygments 2.17.2. --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Michał G. <mgo...@us...> - 2024-04-12 02:52:30
|
I've been running them from inside the `test` subdirectory. From top directory and from `/tmp`, the result's the same. I can't run it from `/` because they try to write into cwd. That said, I've found the root cause: it's a change in Pillow 10.3.0. With 10.2.0, the tests pass. --- **[bugs:#485] 0.21.1: `FAIL: test_publish (test_writers.test_html5_polyglot_parts.Html5WriterPublishPartsTestCase.test_publish) (id="totest['image_messages'][0]")`** **Status:** open **Created:** Thu Apr 11, 2024 02:48 PM UTC by Michał Górny **Last Updated:** Thu Apr 11, 2024 08:33 PM UTC **Owner:** nobody This is one more test failure, introduced by a different commit than these reported in #484: ``` ====================================================================== FAIL: test_publish (test_writers.test_html5_polyglot_parts.Html5WriterPublishPartsTestCase.test_publish) (id="totest['image_messages'][0]") ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/docutils/test/test_writers/test_html5_polyglot_parts.py", line 54, in test_publish self.assertEqual(case_expected, self.format_output(parts)) AssertionError: {'fra[318 chars]y: \'dummy.png\'</p>\n</aside>\n<aside class="[620 chars]>\n'} != {'fra[318 chars]y: \'/tmp/docutils/test/dummy.png\'</p>\n</asi[639 chars]>\n'} {'fragment': '<img alt="dummy.png" src="dummy.png" />\n' '<aside class="system-message">\n' '<p class="system-message-title">System Message: WARNING/2 (<span ' 'class="docutils literal"><string></span>, line 1)</p>\n' '<p>Cannot scale image!\n' ' Could not get size from "dummy.png":\n' - " [Errno 2] No such file or directory: 'dummy.png'</p>\n" ? ^ ----------------- + ' [Errno 2] No such file or directory: ' ? ^ + "'/tmp/docutils/test/dummy.png'</p>\n" '</aside>\n' '<aside class="system-message">\n' '<p class="system-message-title">System Message: ERROR/3 (<span ' 'class="docutils literal"><string></span>, line 1)</p>\n' '<p>Cannot embed image "dummy.png":\n' " [Errno 2] No such file or directory: 'dummy.png'</p>\n" '</aside>\n' '<video src="dummy.mp4" title="dummy.mp4">\n' '<a href="dummy.mp4">dummy.mp4</a>\n' '</video>\n' '<aside class="system-message">\n' '<p class="system-message-title">System Message: WARNING/2 (<span ' 'class="docutils literal"><string></span>, line 5)</p>\n' '<p>Cannot scale image!\n' ' Could not get size from "dummy.mp4":\n' ' PIL cannot read video images.</p>\n' '</aside>\n'} ``` Bisected it down to: ``` commit 2d4e66bb87aff0b62c67f3edc9792298dbadff07 Author: milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> Date: Thu Dec 14 22:38:58 2023 +0000 Refactor "_html_base" writer. Auxiliary method `HTMLTranslator.image_size()` to bring `HTMLTranslator.visit_image()` to a reasonable size. Improve/test error reporting when an image file cannot be read. Sort methods in `HTMLTranslator`. Small cleanups and optimizations. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@9501 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 docutils/writers/_html_base.py | 230 ++++++++++++------------- test/test_writers/test_html5_polyglot_misc.py | 4 +- test/test_writers/test_html5_polyglot_parts.py | 72 +++++++- 3 files changed, 181 insertions(+), 125 deletions(-) ``` I can reproduce with Python 3.10.14, 3.11.9, 3.12.3; Pillow 10.3.0, Pygments 2.17.2. --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Günter M. <mi...@us...> - 2024-04-12 09:55:03
|
Thank you for the analysis. Could you try whether it is fixed in [r9641]? (I am away and offline for the weekend.) --- **[bugs:#485] 0.21.1: `FAIL: test_publish (test_writers.test_html5_polyglot_parts.Html5WriterPublishPartsTestCase.test_publish) (id="totest['image_messages'][0]")`** **Status:** open **Created:** Thu Apr 11, 2024 02:48 PM UTC by Michał Górny **Last Updated:** Fri Apr 12, 2024 02:52 AM UTC **Owner:** nobody This is one more test failure, introduced by a different commit than these reported in #484: ``` ====================================================================== FAIL: test_publish (test_writers.test_html5_polyglot_parts.Html5WriterPublishPartsTestCase.test_publish) (id="totest['image_messages'][0]") ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/docutils/test/test_writers/test_html5_polyglot_parts.py", line 54, in test_publish self.assertEqual(case_expected, self.format_output(parts)) AssertionError: {'fra[318 chars]y: \'dummy.png\'</p>\n</aside>\n<aside class="[620 chars]>\n'} != {'fra[318 chars]y: \'/tmp/docutils/test/dummy.png\'</p>\n</asi[639 chars]>\n'} {'fragment': '<img alt="dummy.png" src="dummy.png" />\n' '<aside class="system-message">\n' '<p class="system-message-title">System Message: WARNING/2 (<span ' 'class="docutils literal"><string></span>, line 1)</p>\n' '<p>Cannot scale image!\n' ' Could not get size from "dummy.png":\n' - " [Errno 2] No such file or directory: 'dummy.png'</p>\n" ? ^ ----------------- + ' [Errno 2] No such file or directory: ' ? ^ + "'/tmp/docutils/test/dummy.png'</p>\n" '</aside>\n' '<aside class="system-message">\n' '<p class="system-message-title">System Message: ERROR/3 (<span ' 'class="docutils literal"><string></span>, line 1)</p>\n' '<p>Cannot embed image "dummy.png":\n' " [Errno 2] No such file or directory: 'dummy.png'</p>\n" '</aside>\n' '<video src="dummy.mp4" title="dummy.mp4">\n' '<a href="dummy.mp4">dummy.mp4</a>\n' '</video>\n' '<aside class="system-message">\n' '<p class="system-message-title">System Message: WARNING/2 (<span ' 'class="docutils literal"><string></span>, line 5)</p>\n' '<p>Cannot scale image!\n' ' Could not get size from "dummy.mp4":\n' ' PIL cannot read video images.</p>\n' '</aside>\n'} ``` Bisected it down to: ``` commit 2d4e66bb87aff0b62c67f3edc9792298dbadff07 Author: milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> Date: Thu Dec 14 22:38:58 2023 +0000 Refactor "_html_base" writer. Auxiliary method `HTMLTranslator.image_size()` to bring `HTMLTranslator.visit_image()` to a reasonable size. Improve/test error reporting when an image file cannot be read. Sort methods in `HTMLTranslator`. Small cleanups and optimizations. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@9501 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 docutils/writers/_html_base.py | 230 ++++++++++++------------- test/test_writers/test_html5_polyglot_misc.py | 4 +- test/test_writers/test_html5_polyglot_parts.py | 72 +++++++- 3 files changed, 181 insertions(+), 125 deletions(-) ``` I can reproduce with Python 3.10.14, 3.11.9, 3.12.3; Pillow 10.3.0, Pygments 2.17.2. --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Michał G. <mgo...@us...> - 2024-04-12 12:06:11
|
All tests pass on tip. Thanks a lot! --- **[bugs:#485] 0.21.1: `FAIL: test_publish (test_writers.test_html5_polyglot_parts.Html5WriterPublishPartsTestCase.test_publish) (id="totest['image_messages'][0]")`** **Status:** open **Created:** Thu Apr 11, 2024 02:48 PM UTC by Michał Górny **Last Updated:** Fri Apr 12, 2024 09:54 AM UTC **Owner:** nobody This is one more test failure, introduced by a different commit than these reported in #484: ``` ====================================================================== FAIL: test_publish (test_writers.test_html5_polyglot_parts.Html5WriterPublishPartsTestCase.test_publish) (id="totest['image_messages'][0]") ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/docutils/test/test_writers/test_html5_polyglot_parts.py", line 54, in test_publish self.assertEqual(case_expected, self.format_output(parts)) AssertionError: {'fra[318 chars]y: \'dummy.png\'</p>\n</aside>\n<aside class="[620 chars]>\n'} != {'fra[318 chars]y: \'/tmp/docutils/test/dummy.png\'</p>\n</asi[639 chars]>\n'} {'fragment': '<img alt="dummy.png" src="dummy.png" />\n' '<aside class="system-message">\n' '<p class="system-message-title">System Message: WARNING/2 (<span ' 'class="docutils literal"><string></span>, line 1)</p>\n' '<p>Cannot scale image!\n' ' Could not get size from "dummy.png":\n' - " [Errno 2] No such file or directory: 'dummy.png'</p>\n" ? ^ ----------------- + ' [Errno 2] No such file or directory: ' ? ^ + "'/tmp/docutils/test/dummy.png'</p>\n" '</aside>\n' '<aside class="system-message">\n' '<p class="system-message-title">System Message: ERROR/3 (<span ' 'class="docutils literal"><string></span>, line 1)</p>\n' '<p>Cannot embed image "dummy.png":\n' " [Errno 2] No such file or directory: 'dummy.png'</p>\n" '</aside>\n' '<video src="dummy.mp4" title="dummy.mp4">\n' '<a href="dummy.mp4">dummy.mp4</a>\n' '</video>\n' '<aside class="system-message">\n' '<p class="system-message-title">System Message: WARNING/2 (<span ' 'class="docutils literal"><string></span>, line 5)</p>\n' '<p>Cannot scale image!\n' ' Could not get size from "dummy.mp4":\n' ' PIL cannot read video images.</p>\n' '</aside>\n'} ``` Bisected it down to: ``` commit 2d4e66bb87aff0b62c67f3edc9792298dbadff07 Author: milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> Date: Thu Dec 14 22:38:58 2023 +0000 Refactor "_html_base" writer. Auxiliary method `HTMLTranslator.image_size()` to bring `HTMLTranslator.visit_image()` to a reasonable size. Improve/test error reporting when an image file cannot be read. Sort methods in `HTMLTranslator`. Small cleanups and optimizations. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@9501 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 docutils/writers/_html_base.py | 230 ++++++++++++------------- test/test_writers/test_html5_polyglot_misc.py | 4 +- test/test_writers/test_html5_polyglot_parts.py | 72 +++++++- 3 files changed, 181 insertions(+), 125 deletions(-) ``` I can reproduce with Python 3.10.14, 3.11.9, 3.12.3; Pillow 10.3.0, Pygments 2.17.2. --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Günter M. <mi...@us...> - 2024-04-15 12:29:44
|
I changed the test a bit to cover the case of Docutils without PIL. Could you test once more with [r9643]? --- **[bugs:#485] 0.21.1: `FAIL: test_publish (test_writers.test_html5_polyglot_parts.Html5WriterPublishPartsTestCase.test_publish) (id="totest['image_messages'][0]")`** **Status:** open **Created:** Thu Apr 11, 2024 02:48 PM UTC by Michał Górny **Last Updated:** Fri Apr 12, 2024 12:06 PM UTC **Owner:** nobody This is one more test failure, introduced by a different commit than these reported in #484: ``` ====================================================================== FAIL: test_publish (test_writers.test_html5_polyglot_parts.Html5WriterPublishPartsTestCase.test_publish) (id="totest['image_messages'][0]") ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/docutils/test/test_writers/test_html5_polyglot_parts.py", line 54, in test_publish self.assertEqual(case_expected, self.format_output(parts)) AssertionError: {'fra[318 chars]y: \'dummy.png\'</p>\n</aside>\n<aside class="[620 chars]>\n'} != {'fra[318 chars]y: \'/tmp/docutils/test/dummy.png\'</p>\n</asi[639 chars]>\n'} {'fragment': '<img alt="dummy.png" src="dummy.png" />\n' '<aside class="system-message">\n' '<p class="system-message-title">System Message: WARNING/2 (<span ' 'class="docutils literal"><string></span>, line 1)</p>\n' '<p>Cannot scale image!\n' ' Could not get size from "dummy.png":\n' - " [Errno 2] No such file or directory: 'dummy.png'</p>\n" ? ^ ----------------- + ' [Errno 2] No such file or directory: ' ? ^ + "'/tmp/docutils/test/dummy.png'</p>\n" '</aside>\n' '<aside class="system-message">\n' '<p class="system-message-title">System Message: ERROR/3 (<span ' 'class="docutils literal"><string></span>, line 1)</p>\n' '<p>Cannot embed image "dummy.png":\n' " [Errno 2] No such file or directory: 'dummy.png'</p>\n" '</aside>\n' '<video src="dummy.mp4" title="dummy.mp4">\n' '<a href="dummy.mp4">dummy.mp4</a>\n' '</video>\n' '<aside class="system-message">\n' '<p class="system-message-title">System Message: WARNING/2 (<span ' 'class="docutils literal"><string></span>, line 5)</p>\n' '<p>Cannot scale image!\n' ' Could not get size from "dummy.mp4":\n' ' PIL cannot read video images.</p>\n' '</aside>\n'} ``` Bisected it down to: ``` commit 2d4e66bb87aff0b62c67f3edc9792298dbadff07 Author: milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> Date: Thu Dec 14 22:38:58 2023 +0000 Refactor "_html_base" writer. Auxiliary method `HTMLTranslator.image_size()` to bring `HTMLTranslator.visit_image()` to a reasonable size. Improve/test error reporting when an image file cannot be read. Sort methods in `HTMLTranslator`. Small cleanups and optimizations. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@9501 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 docutils/writers/_html_base.py | 230 ++++++++++++------------- test/test_writers/test_html5_polyglot_misc.py | 4 +- test/test_writers/test_html5_polyglot_parts.py | 72 +++++++- 3 files changed, 181 insertions(+), 125 deletions(-) ``` I can reproduce with Python 3.10.14, 3.11.9, 3.12.3; Pillow 10.3.0, Pygments 2.17.2. --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Michał G. <mgo...@us...> - 2024-04-15 13:15:48
|
Sure. I can confirm that all tests pass both with and without dependencies installed. I've tested with Python 3.9, 3.12 and PyPy3.10. --- **[bugs:#485] 0.21.1: `FAIL: test_publish (test_writers.test_html5_polyglot_parts.Html5WriterPublishPartsTestCase.test_publish) (id="totest['image_messages'][0]")`** **Status:** open **Created:** Thu Apr 11, 2024 02:48 PM UTC by Michał Górny **Last Updated:** Mon Apr 15, 2024 12:29 PM UTC **Owner:** nobody This is one more test failure, introduced by a different commit than these reported in #484: ``` ====================================================================== FAIL: test_publish (test_writers.test_html5_polyglot_parts.Html5WriterPublishPartsTestCase.test_publish) (id="totest['image_messages'][0]") ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/docutils/test/test_writers/test_html5_polyglot_parts.py", line 54, in test_publish self.assertEqual(case_expected, self.format_output(parts)) AssertionError: {'fra[318 chars]y: \'dummy.png\'</p>\n</aside>\n<aside class="[620 chars]>\n'} != {'fra[318 chars]y: \'/tmp/docutils/test/dummy.png\'</p>\n</asi[639 chars]>\n'} {'fragment': '<img alt="dummy.png" src="dummy.png" />\n' '<aside class="system-message">\n' '<p class="system-message-title">System Message: WARNING/2 (<span ' 'class="docutils literal"><string></span>, line 1)</p>\n' '<p>Cannot scale image!\n' ' Could not get size from "dummy.png":\n' - " [Errno 2] No such file or directory: 'dummy.png'</p>\n" ? ^ ----------------- + ' [Errno 2] No such file or directory: ' ? ^ + "'/tmp/docutils/test/dummy.png'</p>\n" '</aside>\n' '<aside class="system-message">\n' '<p class="system-message-title">System Message: ERROR/3 (<span ' 'class="docutils literal"><string></span>, line 1)</p>\n' '<p>Cannot embed image "dummy.png":\n' " [Errno 2] No such file or directory: 'dummy.png'</p>\n" '</aside>\n' '<video src="dummy.mp4" title="dummy.mp4">\n' '<a href="dummy.mp4">dummy.mp4</a>\n' '</video>\n' '<aside class="system-message">\n' '<p class="system-message-title">System Message: WARNING/2 (<span ' 'class="docutils literal"><string></span>, line 5)</p>\n' '<p>Cannot scale image!\n' ' Could not get size from "dummy.mp4":\n' ' PIL cannot read video images.</p>\n' '</aside>\n'} ``` Bisected it down to: ``` commit 2d4e66bb87aff0b62c67f3edc9792298dbadff07 Author: milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> Date: Thu Dec 14 22:38:58 2023 +0000 Refactor "_html_base" writer. Auxiliary method `HTMLTranslator.image_size()` to bring `HTMLTranslator.visit_image()` to a reasonable size. Improve/test error reporting when an image file cannot be read. Sort methods in `HTMLTranslator`. Small cleanups and optimizations. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@9501 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 docutils/writers/_html_base.py | 230 ++++++++++++------------- test/test_writers/test_html5_polyglot_misc.py | 4 +- test/test_writers/test_html5_polyglot_parts.py | 72 +++++++- 3 files changed, 181 insertions(+), 125 deletions(-) ``` I can reproduce with Python 3.10.14, 3.11.9, 3.12.3; Pillow 10.3.0, Pygments 2.17.2. --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Günter M. <mi...@us...> - 2024-04-24 08:19:29
|
- **status**: open-fixed --> open - **Comment**: Fixed in Docutils 0.21.2 . Thank you for the report. --- **[bugs:#485] 0.21.1: `FAIL: test_publish (test_writers.test_html5_polyglot_parts.Html5WriterPublishPartsTestCase.test_publish) (id="totest['image_messages'][0]")`** **Status:** open **Created:** Thu Apr 11, 2024 02:48 PM UTC by Michał Górny **Last Updated:** Mon Apr 15, 2024 04:03 PM UTC **Owner:** nobody This is one more test failure, introduced by a different commit than these reported in #484: ``` ====================================================================== FAIL: test_publish (test_writers.test_html5_polyglot_parts.Html5WriterPublishPartsTestCase.test_publish) (id="totest['image_messages'][0]") ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/docutils/test/test_writers/test_html5_polyglot_parts.py", line 54, in test_publish self.assertEqual(case_expected, self.format_output(parts)) AssertionError: {'fra[318 chars]y: \'dummy.png\'</p>\n</aside>\n<aside class="[620 chars]>\n'} != {'fra[318 chars]y: \'/tmp/docutils/test/dummy.png\'</p>\n</asi[639 chars]>\n'} {'fragment': '<img alt="dummy.png" src="dummy.png" />\n' '<aside class="system-message">\n' '<p class="system-message-title">System Message: WARNING/2 (<span ' 'class="docutils literal"><string></span>, line 1)</p>\n' '<p>Cannot scale image!\n' ' Could not get size from "dummy.png":\n' - " [Errno 2] No such file or directory: 'dummy.png'</p>\n" ? ^ ----------------- + ' [Errno 2] No such file or directory: ' ? ^ + "'/tmp/docutils/test/dummy.png'</p>\n" '</aside>\n' '<aside class="system-message">\n' '<p class="system-message-title">System Message: ERROR/3 (<span ' 'class="docutils literal"><string></span>, line 1)</p>\n' '<p>Cannot embed image "dummy.png":\n' " [Errno 2] No such file or directory: 'dummy.png'</p>\n" '</aside>\n' '<video src="dummy.mp4" title="dummy.mp4">\n' '<a href="dummy.mp4">dummy.mp4</a>\n' '</video>\n' '<aside class="system-message">\n' '<p class="system-message-title">System Message: WARNING/2 (<span ' 'class="docutils literal"><string></span>, line 5)</p>\n' '<p>Cannot scale image!\n' ' Could not get size from "dummy.mp4":\n' ' PIL cannot read video images.</p>\n' '</aside>\n'} ``` Bisected it down to: ``` commit 2d4e66bb87aff0b62c67f3edc9792298dbadff07 Author: milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> Date: Thu Dec 14 22:38:58 2023 +0000 Refactor "_html_base" writer. Auxiliary method `HTMLTranslator.image_size()` to bring `HTMLTranslator.visit_image()` to a reasonable size. Improve/test error reporting when an image file cannot be read. Sort methods in `HTMLTranslator`. Small cleanups and optimizations. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@9501 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 docutils/writers/_html_base.py | 230 ++++++++++++------------- test/test_writers/test_html5_polyglot_misc.py | 4 +- test/test_writers/test_html5_polyglot_parts.py | 72 +++++++- 3 files changed, 181 insertions(+), 125 deletions(-) ``` I can reproduce with Python 3.10.14, 3.11.9, 3.12.3; Pillow 10.3.0, Pygments 2.17.2. --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Günter M. <mi...@us...> - 2024-04-24 08:19:47
|
- **status**: open --> closed-fixed --- **[bugs:#485] 0.21.1: `FAIL: test_publish (test_writers.test_html5_polyglot_parts.Html5WriterPublishPartsTestCase.test_publish) (id="totest['image_messages'][0]")`** **Status:** closed-fixed **Created:** Thu Apr 11, 2024 02:48 PM UTC by Michał Górny **Last Updated:** Wed Apr 24, 2024 08:19 AM UTC **Owner:** nobody This is one more test failure, introduced by a different commit than these reported in #484: ``` ====================================================================== FAIL: test_publish (test_writers.test_html5_polyglot_parts.Html5WriterPublishPartsTestCase.test_publish) (id="totest['image_messages'][0]") ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/docutils/test/test_writers/test_html5_polyglot_parts.py", line 54, in test_publish self.assertEqual(case_expected, self.format_output(parts)) AssertionError: {'fra[318 chars]y: \'dummy.png\'</p>\n</aside>\n<aside class="[620 chars]>\n'} != {'fra[318 chars]y: \'/tmp/docutils/test/dummy.png\'</p>\n</asi[639 chars]>\n'} {'fragment': '<img alt="dummy.png" src="dummy.png" />\n' '<aside class="system-message">\n' '<p class="system-message-title">System Message: WARNING/2 (<span ' 'class="docutils literal"><string></span>, line 1)</p>\n' '<p>Cannot scale image!\n' ' Could not get size from "dummy.png":\n' - " [Errno 2] No such file or directory: 'dummy.png'</p>\n" ? ^ ----------------- + ' [Errno 2] No such file or directory: ' ? ^ + "'/tmp/docutils/test/dummy.png'</p>\n" '</aside>\n' '<aside class="system-message">\n' '<p class="system-message-title">System Message: ERROR/3 (<span ' 'class="docutils literal"><string></span>, line 1)</p>\n' '<p>Cannot embed image "dummy.png":\n' " [Errno 2] No such file or directory: 'dummy.png'</p>\n" '</aside>\n' '<video src="dummy.mp4" title="dummy.mp4">\n' '<a href="dummy.mp4">dummy.mp4</a>\n' '</video>\n' '<aside class="system-message">\n' '<p class="system-message-title">System Message: WARNING/2 (<span ' 'class="docutils literal"><string></span>, line 5)</p>\n' '<p>Cannot scale image!\n' ' Could not get size from "dummy.mp4":\n' ' PIL cannot read video images.</p>\n' '</aside>\n'} ``` Bisected it down to: ``` commit 2d4e66bb87aff0b62c67f3edc9792298dbadff07 Author: milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> Date: Thu Dec 14 22:38:58 2023 +0000 Refactor "_html_base" writer. Auxiliary method `HTMLTranslator.image_size()` to bring `HTMLTranslator.visit_image()` to a reasonable size. Improve/test error reporting when an image file cannot be read. Sort methods in `HTMLTranslator`. Small cleanups and optimizations. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@9501 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 docutils/writers/_html_base.py | 230 ++++++++++++------------- test/test_writers/test_html5_polyglot_misc.py | 4 +- test/test_writers/test_html5_polyglot_parts.py | 72 +++++++- 3 files changed, 181 insertions(+), 125 deletions(-) ``` I can reproduce with Python 3.10.14, 3.11.9, 3.12.3; Pillow 10.3.0, Pygments 2.17.2. --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |