[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [bridgedb/master] Fix doctest context in bridgedb.Bridges.is_valid_ip().
commit 6ba48b9a02f6e3dc1d3724ee01e51a19a3853e5b
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date: Fri Dec 20 06:58:33 2013 +0000
Fix doctest context in bridgedb.Bridges.is_valid_ip().
---
lib/bridgedb/Bridges.py | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/lib/bridgedb/Bridges.py b/lib/bridgedb/Bridges.py
index 177173c..44cb787 100644
--- a/lib/bridgedb/Bridges.py
+++ b/lib/bridgedb/Bridges.py
@@ -35,17 +35,18 @@ def is_valid_ip(ip):
"""Return True if ip is the string encoding of a valid IPv4 address,
and False otherwise.
- >>> is_valid_ip('1.2.3.4')
+ >>> from bridgedb import Bridges
+ >>> Bridges.is_valid_ip('1.2.3.4')
True
- >>> is_valid_ip('1.2.3.255')
+ >>> Bridges.is_valid_ip('1.2.3.255')
True
- >>> is_valid_ip('1.2.3.256')
+ >>> Bridges.is_valid_ip('1.2.3.256')
False
- >>> is_valid_ip('1')
+ >>> Bridges.is_valid_ip('1')
False
- >>> is_valid_ip('1.2.3')
+ >>> Bridges.is_valid_ip('1.2.3')
False
- >>> is_valid_ip('xyzzy')
+ >>> Bridges.is_valid_ip('xyzzy')
False
"""
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits