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

Improve swap.py test coverage #6176

Merged
merged 4 commits into from
Nov 8, 2022
Merged

Improve swap.py test coverage #6176

merged 4 commits into from
Nov 8, 2022

Conversation

Mjh9122
Copy link
Contributor

@Mjh9122 Mjh9122 commented Nov 4, 2022

Added tests in test_swap, hitting edge cases when self loops or small cycles are hit, or when no edges are available to be swapped.

networkx/algorithms/tests/test_swap.py Outdated Show resolved Hide resolved
networkx/algorithms/tests/test_swap.py Outdated Show resolved Hide resolved
Mjh9122 and others added 2 commits November 4, 2022 12:46
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Copy link
Contributor

@rossbar rossbar left a comment

Choose a reason for hiding this comment

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

Generally LGTM, one last note about adding a comment to one of the test cases since. Thanks @Mjh9122 !

networkx/algorithms/tests/test_swap.py Outdated Show resolved Hide resolved
networkx/algorithms/tests/test_swap.py Outdated Show resolved Hide resolved
@MridulS MridulS merged commit 36d3412 into networkx:main Nov 8, 2022
@jarrodmillman jarrodmillman added this to the networkx-3.0 milestone Nov 10, 2022
@Mjh9122 Mjh9122 deleted the swap-tests branch November 10, 2022 20:09
@jarrodmillman jarrodmillman changed the title Swap.py coverage to 100 Improve swap.py test coverage Jan 7, 2023
MridulS pushed a commit to MridulS/networkx that referenced this pull request Feb 4, 2023
* swap tests added, coverage at 100

* Build from edgelist

Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>

* Regex match added to error tests

* F strings removed, comment added

Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Mjh9122 added a commit to Mjh9122/networkx that referenced this pull request Feb 27, 2023
* swap tests added, coverage at 100

* Build from edgelist

Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>

* Regex match added to error tests

* F strings removed, comment added

Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
cvanelteren pushed a commit to cvanelteren/networkx that referenced this pull request Apr 22, 2024
* swap tests added, coverage at 100

* Build from edgelist

Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>

* Regex match added to error tests

* F strings removed, comment added

Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants