Commit 3d34ff57 authored by Jeremy Hylton's avatar Jeremy Hylton

It is customary to include an argument list at the end of a def line.

Also:
    - call shuffle correctly.
    - simplify test_suite()
parent db2e6ca1
......@@ -56,7 +56,7 @@ class TestMultiUnion(TestCase):
self.assertEqual(len(output), 50000)
self.assertEqual(list(output), range(50000))
def testLotsOfLittleOnes:
def testLotsOfLittleOnes(self):
from random import shuffle
N = 5000
inputs = []
......@@ -64,15 +64,13 @@ class TestMultiUnion(TestCase):
base = i * 4 - N
inputs.append(IISet([base, base+1]))
inputs.append(IITreeSet([base+2, base+3]))
inputs.shuffle()
shuffle(inputs)
output = multiunion(inputs)
self.assertEqual(len(output), N*4)
self.assertEqual(list(output), range(-N, 3*N))
def test_suite():
alltests = TestSuite((makeSuite(TestMultiUnion, 'test'),
))
return alltests
return makeSuite(TestMultiUnion, 'test')
def main():
TextTestRunner().run(test_suite())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment