Add Python tests for `newman_weighted_closeness_centrality`
What is the expected enhancement?
In #1385, we skipped the Python tests for newman_weighted_closeness_centrality. Before the 0.17 release, we need to test the function.
Notice that the PR has Rust tests, so basing the tests from the version should be fine. We also need to test the behaviour when weight_fn is None.
@IvanIsCoding Can you clarify what you mean by "basing the tests from the version should be fine."? I am interesting in taking this issue.
@IvanIsCoding Can you clarify what you mean by "basing the tests from the version should be fine."? I am interesting in taking this issue.
Of course. You can use these tests as a reference: https://github.com/Qiskit/rustworkx/blob/286a719db1ecb40d9a6faf6215f13576bc1d1b91/rustworkx-core/src/centrality.rs#L1250
At the Python level, we are mostly concerned in the correctness of covering most arguments like weight function , default weight, checking that the returned value is a dictionary-like with correct values. The graph inputs don’t need to be original, feel free to copy from Rust