SF patch #736962: Port tests to unittest
(Contributed by Walter Dörwald).
* Convert three test modules to unittest format.
* Expanded coverage in test_structseq.py.
* Raymond added a new test in test_sets.py
diff --git a/Lib/test/test_sets.py b/Lib/test/test_sets.py
index f0a1925..416b7ca 100644
--- a/Lib/test/test_sets.py
+++ b/Lib/test/test_sets.py
@@ -596,6 +596,7 @@
self.set.difference(self.other)
else:
self.assertRaises(TypeError, self.set.difference, self.other)
+
#------------------------------------------------------------------------------
class TestOnlySetsNumeric(TestOnlySetsInBinaryOps):
@@ -647,6 +648,14 @@
self.other = gen()
self.otherIsIterable = True
+#------------------------------------------------------------------------------
+
+class TestOnlySetsofSets(TestOnlySetsInBinaryOps):
+ def setUp(self):
+ self.set = Set((1, 2, 3))
+ self.other = [Set('ab'), ImmutableSet('cd')]
+ self.otherIsIterable = True
+
#==============================================================================
class TestCopying(unittest.TestCase):
@@ -801,6 +810,7 @@
TestOnlySetsTuple,
TestOnlySetsString,
TestOnlySetsGenerator,
+ TestOnlySetsofSets,
TestCopyingEmpty,
TestCopyingSingleton,
TestCopyingTriple,