jenkins-bot submitted this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[bugfix] Drop is_ip_address('0.0.00.0') test assertion

Strange. Previously this test passed but now it doesn't...

% python -m tests.tools_tests TestIsIpAddress
...
======================================================================
FAIL: test_valid_ipv4_addresses (__main__.TestIsIpAddress) (ip_address='0.0.00.0')
Check with valid IPv4 addresses.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/atagar/Desktop/pywikibot/tests/tools_tests.py", line 768, in
test_valid_ipv4_addresses
self.assertTrue(is_ip_address(address))
AssertionError: False is not true

We shouldn't assert that '0.0.00.0' is either valid *or* invalid since this can
evidently vary (though I don't know why). This method is just a pass-through
for python's ipaddress module so this is not a difference we can address within
our code.

Change-Id: I8a600315491863e013018fcc9e40d8a4e7d6a9d0
---
M tests/tools_tests.py
1 file changed, 0 insertions(+), 1 deletion(-)

diff --git a/tests/tools_tests.py b/tests/tools_tests.py
index 0d5fd07..66a6bb5 100644
--- a/tests/tools_tests.py
+++ b/tests/tools_tests.py
@@ -756,7 +756,6 @@
"""Check with valid IPv4 addresses."""
valid_addresses = (
'0.0.0.0',
- '0.0.00.0',
'1.2.3.4',
'1.2.3.4',
'192.168.0.1',

To view, visit change 698635. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I8a600315491863e013018fcc9e40d8a4e7d6a9d0
Gerrit-Change-Number: 698635
Gerrit-PatchSet: 3
Gerrit-Owner: Damian <atagar1@gmail.com>
Gerrit-Reviewer: DannyS712 <dannys712.wiki@gmail.com>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged