Closed whart222 closed 4 years ago
What is the motivation for this PR? More specifically, what is the purpose of setting the COLUMNS environment variable or setting the (apparently unused) self.maxDiff = None
?
I am alo not entirely clear as to the motivation for removing the print statements: that output should be suppressed by nosetests when tests pass. However, when tests fail, the raw printed output is far easier to compare with the baseline than the diff produced by assert equal.
These tests failed using Anaconda Python 3.8 on a new machine, because the word-wrap length differed in that context from previous/other contexts. This change merely hard-codes the word-wrap length to ensure that tests will always pass.
In my opinion, debugging print() statements should not be included in tests simply to support debugging of tests. These can easily be added when tests fail. Even though nose suppresses this output, such output does slow down the testing. And as we've seen with large test suites in other projects, the time needed to run tests can become a bottleneck.
@jsiirola Is there a reason to delay approval of this PR further? Did this just get lost in the shuffle?
This just got lost... I had a minor change to ensure that tearDown
doesn't remove COLUMNS
from the environment if it was already there. Once tests pass, we should merge.
Hard-coding the test wrapping length, to ensure that tests pass consistently.
Removing print() statements in tests, to make them less verbose.
Fixes: N/A
Summary/Motivation:
This resolves new test failures that have arisen when using Python 3.8
Changes proposed in this PR:
Hard-coding configuration of pyutilib.misc tests.
Legal Acknowledgement
By contributing to this software project, I agree to the following terms and conditions for my contribution: