diff options
author | Raymond Hettinger <python@rcn.com> | 2003-08-30 22:54:55 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-08-30 22:54:55 (GMT) |
commit | f9f4c6945e14f5ad7f29085fcd756645348b13ae (patch) | |
tree | 2f1b9bee81f83d157a00da7101d0a411ade4f9ee /Lib/test/test_sets.py | |
parent | c11dbcd4bfb6c366e9ce541b982a036b34f7c30c (diff) | |
download | cpython-f9f4c6945e14f5ad7f29085fcd756645348b13ae.zip cpython-f9f4c6945e14f5ad7f29085fcd756645348b13ae.tar.gz cpython-f9f4c6945e14f5ad7f29085fcd756645348b13ae.tar.bz2 |
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
Diffstat (limited to 'Lib/test/test_sets.py')
-rw-r--r-- | Lib/test/test_sets.py | 10 |
1 files changed, 10 insertions, 0 deletions
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 @@ 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, |