diff options
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/crashers/infinite_rec_4.py | 7 | ||||
-rw-r--r-- | Lib/test/test_builtin.py | 26 |
2 files changed, 0 insertions, 33 deletions
diff --git a/Lib/test/crashers/infinite_rec_4.py b/Lib/test/crashers/infinite_rec_4.py deleted file mode 100644 index 14f1520..0000000 --- a/Lib/test/crashers/infinite_rec_4.py +++ /dev/null @@ -1,7 +0,0 @@ - -# http://python.org/sf/1202533 - -if __name__ == '__main__': - lst = [apply] - lst.append(lst) - apply(*lst) # segfault: infinite recursion in C diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py index 4f10d92..6f11fdd 100644 --- a/Lib/test/test_builtin.py +++ b/Lib/test/test_builtin.py @@ -153,32 +153,6 @@ class BuiltinTest(unittest.TestCase): S = [10, 20, 30] self.assertEqual(any(x > 42 for x in S), False) - def test_apply(self): - def f0(*args): - self.assertEqual(args, ()) - def f1(a1): - self.assertEqual(a1, 1) - def f2(a1, a2): - self.assertEqual(a1, 1) - self.assertEqual(a2, 2) - def f3(a1, a2, a3): - self.assertEqual(a1, 1) - self.assertEqual(a2, 2) - self.assertEqual(a3, 3) - apply(f0, ()) - apply(f1, (1,)) - apply(f2, (1, 2)) - apply(f3, (1, 2, 3)) - - # A PyCFunction that takes only positional parameters should allow an - # empty keyword dictionary to pass without a complaint, but raise a - # TypeError if the dictionary is non-empty. - apply(id, (1,), {}) - self.assertRaises(TypeError, apply, id, (1,), {"foo": 1}) - self.assertRaises(TypeError, apply) - self.assertRaises(TypeError, apply, id, 42) - self.assertRaises(TypeError, apply, id, (42,), 42) - def test_callable(self): self.assert_(callable(len)) def f(): pass |