diff options
author | Tim Peters <tim.peters@gmail.com> | 2002-08-25 17:22:23 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2002-08-25 17:22:23 (GMT) |
commit | 0bbb30830c3e3163f75957bc9b2dcd13e3a578d9 (patch) | |
tree | ce864c5f7a9600e11284c129fa946650a5db78b3 /Lib | |
parent | 4924db176bdd0b4f93bf67c16487f468a1644c1c (diff) | |
download | cpython-0bbb30830c3e3163f75957bc9b2dcd13e3a578d9.zip cpython-0bbb30830c3e3163f75957bc9b2dcd13e3a578d9.tar.gz cpython-0bbb30830c3e3163f75957bc9b2dcd13e3a578d9.tar.bz2 |
Simplified the setup for is-subset testing.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_sets.py | 45 |
1 files changed, 20 insertions, 25 deletions
diff --git a/Lib/test/test_sets.py b/Lib/test/test_sets.py index 65b48e2..db34496 100644 --- a/Lib/test/test_sets.py +++ b/Lib/test/test_sets.py @@ -371,47 +371,42 @@ class TestSubsets(unittest.TestCase): #------------------------------------------------------------------------------ class TestSubsetEqualEmpty(TestSubsets): - def setUp(self): - self.left = Set() - self.right = Set() - self.name = "both empty" - self.cases = "<>" + left = Set() + right = Set() + name = "both empty" + cases = "<>" #------------------------------------------------------------------------------ class TestSubsetEqualNonEmpty(TestSubsets): - def setUp(self): - self.left = Set([1, 2]) - self.right = Set([1, 2]) - self.name = "equal pair" - self.cases = "<>" + left = Set([1, 2]) + right = Set([1, 2]) + name = "equal pair" + cases = "<>" #------------------------------------------------------------------------------ class TestSubsetEmptyNonEmpty(TestSubsets): - def setUp(self): - self.left = Set() - self.right = Set([1, 2]) - self.name = "one empty, one non-empty" - self.cases = "<" + left = Set() + right = Set([1, 2]) + name = "one empty, one non-empty" + cases = "<" #------------------------------------------------------------------------------ class TestSubsetPartial(TestSubsets): - def setUp(self): - self.left = Set([1]) - self.right = Set([1, 2]) - self.name = "one a non-empty subset of other" - self.cases = "<" + left = Set([1]) + right = Set([1, 2]) + name = "one a non-empty subset of other" + cases = "<" #------------------------------------------------------------------------------ class TestSubsetNonOverlap(TestSubsets): - def setUp(self): - self.left = Set([1]) - self.right = Set([2]) - self.name = "neither empty, neither contains" - self.cases = "" + left = Set([1]) + right = Set([2]) + name = "neither empty, neither contains" + cases = "" #============================================================================== |