tehmaze/ipcalc — Issue #9: doctests fail
Author: gandaro
Created: 2012-02-27 12:57:44+00:00
State: open

Currently there are failing two tests:

>**********************************************************************
>File "ipcalc.py", line 361, in `ipcalc.IP.clone`
>Failed example:
> `ip.clone()`
>Expected:
> ``
>Got:
> ``
>**********************************************************************
>File "ipcalc.py", line 534, in ipcalc.Network.__iter__
>Failed example:
>```python
>for ip in Network('192.168.114.0.40'):
> print str(ip)
>```
>Exception raised:
>```
> Traceback (most recent call last):
> File "/usr/lib/python2.7/doctest.py", line 1254, in __run
> compileflags, 1) in test.globs
> File "", line 1, in
> for ip in Network('192.168.114.0.40'):
> File "ipcalc.py", line 161, in __init__
> self.ip = self._dqtoi(ip)
> File "ipcalc.py", line 301, in _dqtoi
> raise ValueError, "%r: IPv4 address invalid: more than 4 bytes" % dq
> ValueError: '192.168.114.0.40': IPv4 address invalid: more than 4 bytes
>```
>**********************************************************************
2 items had failures:
1 of 2 in ipcalc.IP.clone
1 of 1 in ipcalc.Network.__iter__
***Test Failed*** 2 failures.