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

Set maxDiff=None on the base TestCase class #3171

Merged
merged 1 commit into from
Feb 28, 2024
Merged

Conversation

jsiirola
Copy link
Member

Fixes # .

Summary/Motivation:

By default, unittest assertions (severely) truncate the diff error message when a comparison test fails. As we (almost?) always want to see the full diff in order to diagnose the test failure, we end up sprinkling self.maxDiff = None throughout the codebase. This PR adds the flag to the base TestCase class.

Changes proposed in this PR:

  • set maxDiff = None in pyomo.common.unittest.TestCase

Legal Acknowledgement

By contributing to this software project, I have read the contribution guide and 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.

Copy link

codecov bot commented Feb 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.38%. Comparing base (26e4970) to head (e46d2b1).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3171   +/-   ##
=======================================
  Coverage   88.38%   88.38%           
=======================================
  Files         846      846           
  Lines       94857    94858    +1     
=======================================
+ Hits        83835    83844    +9     
+ Misses      11022    11014    -8     
Flag Coverage Δ
linux 86.33% <100.00%> (+<0.01%) ⬆️
osx 75.73% <100.00%> (+<0.01%) ⬆️
other 86.53% <100.00%> (+<0.01%) ⬆️
win 83.82% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mrmundt mrmundt merged commit e83235c into Pyomo:main Feb 28, 2024
33 checks passed
@jsiirola jsiirola deleted the maxdiff branch March 11, 2024 17:18
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.

2 participants