Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix COLUMN width in pyutilib.misc config tests #69

Merged
merged 3 commits into from
Mar 12, 2020
Merged

Conversation

whart222
Copy link
Contributor

  1. Hard-coding the test wrapping length, to ensure that tests pass
    consistently.

  2. 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:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

1. Hard-coding the test wrapping length, to ensure that tests pass
consistently.

2. Removing print() statements in tests, to make them less verbose.
@coveralls
Copy link

coveralls commented Nov 27, 2019

Coverage Status

Coverage remained the same at 61.039% when pulling 31a3fd3 on fix_config_tests into 6591015 on master.

@jsiirola
Copy link
Contributor

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.

@whart222
Copy link
Contributor Author

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.

@whart222
Copy link
Contributor Author

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.

@whart222
Copy link
Contributor Author

whart222 commented Feb 4, 2020

@jsiirola Is there a reason to delay approval of this PR further? Did this just get lost in the shuffle?

@jsiirola
Copy link
Contributor

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.

@jsiirola jsiirola changed the title Fixes to pyutilib.misc config tests Fix COLUMN width in pyutilib.misc config tests Mar 12, 2020
@jsiirola jsiirola merged commit 8f7dbe0 into master Mar 12, 2020
@jsiirola jsiirola deleted the fix_config_tests branch March 12, 2020 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants