summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_longexp.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-08-30 22:54:55 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-08-30 22:54:55 (GMT)
commitf9f4c6945e14f5ad7f29085fcd756645348b13ae (patch)
tree2f1b9bee81f83d157a00da7101d0a411ade4f9ee /Lib/test/test_longexp.py
parentc11dbcd4bfb6c366e9ce541b982a036b34f7c30c (diff)
downloadcpython-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_longexp.py')
-rw-r--r--Lib/test/test_longexp.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/Lib/test/test_longexp.py b/Lib/test/test_longexp.py
index c2c2612..dd222a1 100644
--- a/Lib/test/test_longexp.py
+++ b/Lib/test/test_longexp.py
@@ -1,5 +1,14 @@
+import unittest
+from test import test_support
-REPS = 65580
+class LongExpText(unittest.TestCase):
+ def test_longexp(self):
+ REPS = 65580
+ l = eval("[" + "2," * REPS + "]")
+ self.assertEqual(len(l), REPS)
-l = eval("[" + "2," * REPS + "]")
-print len(l)
+def test_main():
+ test_support.run_unittest(LongExpText)
+
+if __name__=="__main__":
+ test_main()