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

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



commit 0becb7592d0b8480daf2608a0b5032cc733b3c62
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
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.



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