[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [bridgedb/master] Add two new doctests to Dist.uniformMap().



commit c23cf00a83ebdd38b57f8b44a110c50c8d7153b9
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date:   Tue Mar 31 01:09:49 2015 +0000

    Add two new doctests to Dist.uniformMap().
---
 lib/bridgedb/Dist.py |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/bridgedb/Dist.py b/lib/bridgedb/Dist.py
index a454a77..db71db3 100644
--- a/lib/bridgedb/Dist.py
+++ b/lib/bridgedb/Dist.py
@@ -56,6 +56,10 @@ def uniformMap(ip):
     >>> from bridgedb import Dist
     >>> Dist.uniformMap('1.2.3.4')
     '1.2.3'
+    >>> Dist.uniformMap('1.2.3.154')
+    '1.2.3'
+    >>> Dist.uniformMap('2001:f::bc1:b13:2808')
+    '2001:000f:0000:0000'
 
     :param str ip: A string representing an IPv4 or IPv6 address.
     :rtype: str



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits