-
Notifications
You must be signed in to change notification settings - Fork 292
resolve matopt test errors #1632
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
Conversation
…use of fixtures when using return
|
This PR turns a lot of tests into "fixtures", but most of these fixtures don't appear to be called by actual tests. If the thing being tested is object creation, just remove the |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1632 +/- ##
==========================================
- Coverage 77.06% 77.05% -0.02%
==========================================
Files 395 395
Lines 63512 63512
Branches 10358 10358
==========================================
- Hits 48946 48939 -7
- Misses 12126 12134 +8
+ Partials 2440 2439 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
I'll admit that I was lazy about that once I realized what you did. I merely wanted to fix some broken tests for what seemed to be unmaintained code--to get another PR closer to being merged. If you think it's important to make the suggested changes, I can do that. |
|
@dallan-keylogic added the changes |
radhakrishnatg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. But I think you missed a few more fixture names. Could you please fix them? Thank you!
|
|
||
|
|
||
| @pytest.fixture | ||
| def test_construct_SumNeighborSites(construct_MatOptModel): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove test_ from the fixture name. Same comment for the next five fixture names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did this in latest changes (that I'm about to push)
| canvas.addShell(lattice.getNeighbors) | ||
| canvas.setNeighborsFromFunc(lattice.getNeighbors) | ||
| confs = [[None] * len(canvas.NeighborhoodIndexes[0]) for _ in range(1)] | ||
| a0, a1 = test_construct_Atom() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why these lines were removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oversight---bringing these lines back
| canvas = construct_Canvas | ||
| m = construct_MatOptModel | ||
| r = construct_GreaterThan | ||
| print(m) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the print statement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
@dallan-keylogic @radhakrishnatg - I addressed your changes. Please note that without these changes, tests on all PRs will fail and we cannot merge anything else until this goes through (hence the imperfect changes in this PR). |
radhakrishnatg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
|
didn't go through the release notes in detail but it looks like pytest version 8.4.0 is causing these tests to fail: https://github.com/pytest-dev/pytest/releases We can try pinning pytest to 8.3.5 |
|
Let's see if I handled all outliers. If somehow, many more are unveiled, I will just try pinning pytest to version 8.3.5 and post an issue. Otherwise, the PR should be ready to merge assuming no other tests fail. |
I wonder if this is downstream of the Google Cloud outage yesterday. |
Fixes
Summary/Motivation:
Fixes matopt test errors now occurring on all PRs, presumably due to some change in pytest that is more stringent about using fixtures
NOTE: merge this pr asap to resolve test errors on all other PRs
Changes proposed in this PR:
Legal Acknowledgement
By contributing to this software project, I agree to the following terms and conditions for my contribution: