drkjam/netaddr — Issue #20: Test failure with Python 3
Author: Arfrever
Created: 2011-11-07 04:41:46+00:00
State: open

This test failure doesn't occur with Python 2. I use netaddr-0.7.6.

```
..............F..............
======================================================================
FAIL: /tmp/netaddr-0.7.6/netaddr/tests/3.x/ip/platform_linux2.txt
Doctest: platform_linux2.txt
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib64/python3.2/doctest.py", line 2118, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for platform_linux2.txt
File "/tmp/netaddr-0.7.6/netaddr/tests/3.x/ip/platform_linux2.txt", line 0

----------------------------------------------------------------------
File "/tmp/netaddr-0.7.6/netaddr/tests/3.x/ip/platform_linux2.txt", line 82, in platform_linux2.txt
Failed example:
IPAddress('010.000.000.001', flags=INET_PTON)
Expected:
Traceback (most recent call last):
...
AddrFormatError: failed to detect a valid IP address from '010.000.000.001'
Got:
Traceback (most recent call last):
File "/usr/lib64/python3.2/doctest.py", line 1253, in __run
compileflags, 1), test.globs)
File "", line 1, in
IPAddress('010.000.000.001', flags=INET_PTON)
File "/tmp/netaddr-0.7.6/netaddr/ip/__init__.py", line 315, in __init__
'address from %r' % addr)
netaddr.core.AddrFormatError: failed to detect a valid IP address from '010.000.000.001'

----------------------------------------------------------------------
Ran 29 tests in 1.702s

FAILED (failures=1)
```