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

Don't fail a test because there are no public IP addresses #926

Merged
merged 1 commit into from
Feb 20, 2025

Conversation

ellert
Copy link
Contributor

@ellert ellert commented Feb 19, 2025

When running the test suite on a machine without public IP addresses configured there is a list index out of range error:

=================================== FAILURES ===================================
_____________________________ test_disambiguate_ip _____________________________
    def test_disambiguate_ip():
        # garbage in, garbage out
>       public_ip = public_ips()[0]
E       IndexError: list index out of range
ipyparallel/tests/test_util.py:11: IndexError

This commit modifies the test by adding a check that the list is not empty before trying to access its first element.

When running the test suite on a machine without public IP addresses
there is a list index out of range error:

=================================== FAILURES ===================================
_____________________________ test_disambiguate_ip _____________________________
    def test_disambiguate_ip():
        # garbage in, garbage out
>       public_ip = public_ips()[0]
E       IndexError: list index out of range
ipyparallel/tests/test_util.py:11: IndexError

This commit modifies the test by adding a check that the list is not
empty before trying to access its first element.
@ellert ellert changed the title Don't fail a test because the there are no public IP addresses Don't fail a test because there are no public IP addresses Feb 19, 2025
@minrk minrk merged commit d9670ba into ipython:main Feb 20, 2025
15 checks passed
@minrk
Copy link
Member

minrk commented Feb 20, 2025

thanks!

@ellert ellert deleted the no-public-ip branch February 20, 2025 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants