From: Guenter M. <mi...@us...> - 2022-10-31 23:35:24
|
Dear Docutils developers, dear Adam, after a long period of calm, I realize a flurry of commits over the last couple of days -- far more than I can reasonably review in time. It is nice to see development activity but also alarming to see it at this pace, as even a short looking over revealed some pitfalls. For other changes I would have preferred a discussion or at least some rationale in the commit messages (not just a one-liner telling what is done). Changes to the test suite should not only keep the tests running but also ensure intelligable feedback in case of test failures. Did you test how the changes affect error reports? r9135 tex2unichar.py is a generated file, changes will be lost with an update from the database. (I updated the generating script and prepared a fixup patch.) r9140, r9141: Import ``DocutilsTestSupport`` from ``test`` This commit breaks the ability to run individual test scripts from their respective directories. This is (was) an important help when working on the test scripts. r9145 Since when is _format_str() unused? Does this affect reporting of test failures? r9146 DocutilsTestSupport must be imported before docutils so that imports from docutils use the test-dirs parent directory (in case we want to test a not installed Docutils version) r9163 What happend to sys.stdout.flush() ? r9165 compare_output() no longer prints the corresponding input in case of assertion errors which makes finding problems in parser test suites harder. r9167 IMV, an encoded string ("bytes" object) is no "binary" output. I need some more time to understand the changes here. A StringOutput.encode() method that *decodes* bytes data seems odd: @@ -581,6 +600,11 @@ class StringOutput(Output): + def encode(self, data): + if isinstance(data, bytes): + return data.decode(self.encoding, self.error_handler) + return str(data) + r9168 Use ``.rstrip()`` instead This fails with multi-lined output if line endings in output and extended differ. r9178 In case we don't want to ship "quicktest.py" with the Docutils distribution, we can still keep it in the Docutils repo and simply change: -can be found in the ``tools/`` directory of the Docutils distribution) +can be found in the ``tools/`` directory of the Docutils repository) r9179, r9180 there should be a way to avoid this code repetition ... Günter |