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
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()