From f9f4c6945e14f5ad7f29085fcd756645348b13ae Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Sat, 30 Aug 2003 22:54:55 +0000 Subject: =?UTF-8?q?SF=20patch=20#736962:=20=20Port=20tests=20to=20unittest?= =?UTF-8?q?=20(Contributed=20by=20Walter=20D=C3=B6rwald).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Convert three test modules to unittest format. * Expanded coverage in test_structseq.py. * Raymond added a new test in test_sets.py --- Lib/test/test_sets.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Lib/test/test_sets.py') diff --git a/Lib/test/test_sets.py b/Lib/test/test_sets.py index f0a1925d4e..416b7cac3a 100644 --- a/Lib/test/test_sets.py +++ b/Lib/test/test_sets.py @@ -596,6 +596,7 @@ class TestOnlySetsInBinaryOps(unittest.TestCase): self.set.difference(self.other) else: self.assertRaises(TypeError, self.set.difference, self.other) + #------------------------------------------------------------------------------ class TestOnlySetsNumeric(TestOnlySetsInBinaryOps): @@ -647,6 +648,14 @@ class TestOnlySetsGenerator(TestOnlySetsInBinaryOps): 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 @@ def test_main(verbose=None): TestOnlySetsTuple, TestOnlySetsString, TestOnlySetsGenerator, + TestOnlySetsofSets, TestCopyingEmpty, TestCopyingSingleton, TestCopyingTriple, -- cgit v1.2.1