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 invalid condition in compLabeledSys in unittest #603

Closed
wants to merge 2 commits into from

Conversation

robinzyb
Copy link
Collaborator

@robinzyb robinzyb commented Feb 1, 2024

"virials" not in self.system_1

always returns True.

Quick check by inserting and run unittest:

        #     self.assertEqual(len(self.system_1['virials']), 0)
        #     return
        print("valid condition:", not self.system_1.has_virial())
        print("current condition:", "virials" not in self.system_1)
        if not self.system_1.has_virial():
            self.assertFalse(self.system_2.has_virial())
            return
        np.testing.assert_almost_equal(
            self.system_1["virials"],

@robinzyb robinzyb requested a review from njzjz February 1, 2024 20:04
@robinzyb
Copy link
Collaborator Author

robinzyb commented Feb 1, 2024

Failed tests should be carefully examed. Please contact corresponding maintainers.

@njzjz njzjz self-assigned this Feb 1, 2024
@njzjz njzjz mentioned this pull request Feb 1, 2024
Copy link
Member

@njzjz njzjz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fix the tests in #604

@robinzyb robinzyb enabled auto-merge (squash) February 2, 2024 11:22
robinzyb added a commit that referenced this pull request Feb 2, 2024
Based on #603

---------

Co-authored-by: robinzyb <[email protected]>
@robinzyb robinzyb disabled auto-merge February 2, 2024 11:23
@robinzyb robinzyb closed this Feb 2, 2024
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