jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/698635 )
Change subject: [bugfix] Drop is_ip_address('0.0.00.0') test assertion ......................................................................
[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(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
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',