[tor-commits] [bridgedb/develop] Add test for (broken) b.proxy.ProxySet.intersection().

isis at torproject.org isis at torproject.org
Thu Mar 19 22:08:58 UTC 2015


commit 0becb7592d0b8480daf2608a0b5032cc733b3c62
Author: Isis Lovecruft <isis at torproject.org>
Date:   Thu Mar 19 04:29:53 2015 +0000

    Add test for (broken) b.proxy.ProxySet.intersection().
---
 lib/bridgedb/test/test_proxy.py |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/lib/bridgedb/test/test_proxy.py b/lib/bridgedb/test/test_proxy.py
index 144cf70..2a2b4b5 100644
--- a/lib/bridgedb/test/test_proxy.py
+++ b/lib/bridgedb/test/test_proxy.py
@@ -476,6 +476,20 @@ class ProxySetUnittests(unittest.TestCase):
         """ProxySet.issubset() on a subset should return True."""
         self.assertTrue(self.proxyList.issuperset(set(self.proxies[:1])))
 
+    def test_ProxySet_intersection(self):
+        """ProxySet.intersection() should return the combination of two
+        disjoint sets.
+        """
+        raise unittest.SkipTest(
+            ("FIXME: bridgedb.proxy.ProxySet.intersection() is broken and "
+             "always returns an empty set()."))
+
+        a = self.proxies
+        a.extend(self.moarProxies)
+        a = set(a)
+        b = self.proxyList.intersection(set(self.moarProxies))
+        self.assertItemsEqual(a, b)
+
     def test_ProxySet_remove(self):
         """ProxySet.remove() should subtract proxies which were already added
         to the set.





More information about the tor-commits mailing list