diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-03-17 08:00:19 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-03-17 08:00:19 (GMT) |
commit | d91085598f5185b267ea51a3f615da9527af2ed2 (patch) | |
tree | 80849b9455438e9963a61d7aff3fc3b060213553 /Lib/test/test_builtin.py | |
parent | fe55464f393fc002fd0911a4d8dba6694723d408 (diff) | |
download | cpython-d91085598f5185b267ea51a3f615da9527af2ed2.zip cpython-d91085598f5185b267ea51a3f615da9527af2ed2.tar.gz cpython-d91085598f5185b267ea51a3f615da9527af2ed2.tar.bz2 |
Remove apply()
Diffstat (limited to 'Lib/test/test_builtin.py')
-rw-r--r-- | Lib/test/test_builtin.py | 26 |
1 files changed, 0 insertions, 26 deletions
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 |