We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e204e8c + 24008ff commit d9670baCopy full SHA for d9670ba
ipyparallel/tests/test_util.py
@@ -8,12 +8,13 @@
8
9
def test_disambiguate_ip():
10
# garbage in, garbage out
11
- public_ip = public_ips()[0]
12
assert util.disambiguate_ip_address('garbage') == 'garbage'
13
assert util.disambiguate_ip_address('0.0.0.0', socket.gethostname()) == localhost()
14
wontresolve = 'this.wontresolve.dns'
15
with pytest.warns(
16
RuntimeWarning, match=f"IPython could not determine IPs for {wontresolve}"
17
):
18
assert util.disambiguate_ip_address('0.0.0.0', wontresolve) == wontresolve
19
- assert util.disambiguate_ip_address('0.0.0.0', public_ip) == localhost()
+ if public_ips():
+ public_ip = public_ips()[0]
20
+ assert util.disambiguate_ip_address('0.0.0.0', public_ip) == localhost()
0 commit comments