Add test coverage for to_pickle export#106
Conversation
5631a74 to
82f204d
Compare
|
Thank you for adding this, but aren't you just checking that |
|
Hey @leifdenby I know it looks like it's just testing the standard library |
|
Hi, I’d like to work on this issue. Could you please assign it to me? |
|
This is a PR. |
|
Thanks for the clarification! I'll look for open issues instead. |
Adds test_save_to_pickle to tests/test_save.py, mirroring the existing test_save_to_pyg structure. The test verifies: - the output .pkl file is created on disk - the file can be loaded back with pickle.load - the loaded object is a networkx graph - node and edge counts are preserved after the round-trip to_pickle had zero test coverage prior to this commit. Related to the test coverage improvements noted in issue mllam#88.
82f204d to
dc34118
Compare
|
@leifdenby Its been quite a long while. You made a fair point about the test just checking if I've updated the PR to make the test much more rigorous. Instead of just verifying node counts, it now explicitly loops through and asserts that all our custom networkx metadata, multidimensional numpy arrays (like Lmk if this looks better to you now! |
Describe your changes
to_pickleis a public export function insave.pybut had zero testcoverage — unlike
to_pygwhich is already covered bytest_save_to_pyg.Adds
test_save_to_pickletotests/test_save.pymirroring the samestructure. The test does a full round-trip check:
.pklfile is created on disk at the expected pathpickle.load()networkxgraph instanceNo production code touched. No new dependancies introduced.
Issue Link
Related to #88
Type of change
Checklist before requesting a review
pullwith--rebaseoption if possible).Checklist for reviewers
Each PR comes with its own improvements and flaws. The reviewer should check the following:
Author checklist after completed review
reflecting type of change (add section where missing):
Checklist for assignee