-
Notifications
You must be signed in to change notification settings - Fork 157
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
Wrong eigenvector_centrality
test case in rustworkx-core
#798
Comments
eigenvector_centraltiy
test case in rustworkx-core
eigenvector_centrality
test case in rustworkx-core
Hi, Can I work on this issue? |
Yes I have assigned the issue to you. You might want to check https://github.com/Qiskit/rustworkx/blob/main/CONTRIBUTING.md, it has some tips for your first contribution |
Right, thank you. I will go through the codebase right now and create a pull request when I am done... |
I can't seem to find Can you please precisely link the folder the issue is here? @IvanIsCoding |
The test is in the centrality.rs file, this link takes you to the line defining the incorrect macro used in test cases is: https://github.com/Qiskit/rustworkx/blob/main/rustworkx-core/src/centrality.rs#L433 |
Okay, thank you. I am going to do it this way then, The deliverables would be: 2 - Then fix the |
Let me know if i can do it this way so I can start working on it right away... |
That is correct |
Closes #798 I generated the values the test case is checking against using NetworkX. So the implementation is correct, it was just the test case and the assert_almost_equal that were incorrect
Closes Qiskit#798 I generated the values the test case is checking against using NetworkX. So the implementation is correct, it was just the test case and the assert_almost_equal that were incorrect
Information
What is the current behavior?
The
assert_almost_equal!
method in rustworkx-core's test suite foreigenvector_centrality
is implemented incorrectly. It always returns true and never panics. This let a bad test case slip through. (see https://github.com/Qiskit/rustworkx/blob/main/rustworkx-core/src/centrality.rs#L433)What is the expected behavior?
Implement the correct
assert_almost_equal!
like in #797. After, fix the test case.Steps to reproduce the problem
Replace any values in the
expected_values
array and the test case still passes. Implement the correctassert_almost_equal
and the test case fails.The text was updated successfully, but these errors were encountered: