test_longexp.py 233 字节 原文件 审查 历史 永久链接 1 2 3 4 5 6 7 8 9 10 import unittest class LongExpText(unittest.TestCase): def test_longexp(self): REPS = 65580 l = eval("[" + "2," * REPS + "]") self.assertEqual(len(l), REPS) if __name__ == "__main__": unittest.main()