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

[tor-commits] [bridgedb/master] Fix doctest example in Dist.Distributor.setDistributorName().



commit 31e4491cb05ec0eec27edfa380a57c5d58fc05c4
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date:   Sun Jan 12 00:50:07 2014 +0000

    Fix doctest example in Dist.Distributor.setDistributorName().
    
    See https://travis-ci.org/isislovecruft/bridgedb/jobs/16798991#L1591, it
    was erroring because it expected the default hashring name for every
    hashring which was prepopulated.
---
 lib/bridgedb/Dist.py |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/bridgedb/Dist.py b/lib/bridgedb/Dist.py
index 0b9bff2..8357ca6 100644
--- a/lib/bridgedb/Dist.py
+++ b/lib/bridgedb/Dist.py
@@ -70,8 +70,8 @@ class Distributor(bridgedb.Bridges.BridgeHolder):
         >>> ipDist.setDistributorName('HTTPS Distributor')
         >>> ipDist.prepopulateRings()
         >>> hashrings = ipDist.splitter.filterRings
-        >>> for (ringname, (filterFn, subring)) in hashrings.items():
-        ...     print subring.name
+        >>> firstSubring = hashrings.items()[0][1][1]
+        >>> assert firstSubring.name
 
         :param str name: A name for this distributor.
         """



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