diff options
author | Guido van Rossum <guido@python.org> | 2006-08-18 22:13:04 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2006-08-18 22:13:04 (GMT) |
commit | e2b70bcf7401477936fba99a8bf4a1f759ecc8a3 (patch) | |
tree | 4c9b65b7fd8c26a3d2f1b64ecd6b4c72a756b4b2 /Lib/test/test_call.py | |
parent | d2dbecb4ae9177e2e87adcb047147c6bcbf28cc1 (diff) | |
download | cpython-e2b70bcf7401477936fba99a8bf4a1f759ecc8a3.zip cpython-e2b70bcf7401477936fba99a8bf4a1f759ecc8a3.tar.gz cpython-e2b70bcf7401477936fba99a8bf4a1f759ecc8a3.tar.bz2 |
Get rid of dict.has_key(). Boy this has a lot of repercussions!
Not all code has been fixed yet; this is just a checkpoint...
The C API still has PyDict_HasKey() and _HasKeyString(); not sure
if I want to change those just yet.
Diffstat (limited to 'Lib/test/test_call.py')
-rw-r--r-- | Lib/test/test_call.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Lib/test/test_call.py b/Lib/test/test_call.py index f3c7c8c..2652343 100644 --- a/Lib/test/test_call.py +++ b/Lib/test/test_call.py @@ -9,39 +9,39 @@ from test import test_support class CFunctionCalls(unittest.TestCase): def test_varargs0(self): - self.assertRaises(TypeError, {}.has_key) + self.assertRaises(TypeError, {}.__contains__) def test_varargs1(self): - {}.has_key(0) + {}.__contains__(0) def test_varargs2(self): - self.assertRaises(TypeError, {}.has_key, 0, 1) + self.assertRaises(TypeError, {}.__contains__, 0, 1) def test_varargs0_ext(self): try: - {}.has_key(*()) + {}.__contains__(*()) except TypeError: pass def test_varargs1_ext(self): - {}.has_key(*(0,)) + {}.__contains__(*(0,)) def test_varargs2_ext(self): try: - {}.has_key(*(1, 2)) + {}.__contains__(*(1, 2)) except TypeError: pass else: raise RuntimeError def test_varargs0_kw(self): - self.assertRaises(TypeError, {}.has_key, x=2) + self.assertRaises(TypeError, {}.__contains__, x=2) def test_varargs1_kw(self): - self.assertRaises(TypeError, {}.has_key, x=2) + self.assertRaises(TypeError, {}.__contains__, x=2) def test_varargs2_kw(self): - self.assertRaises(TypeError, {}.has_key, x=2, y=2) + self.assertRaises(TypeError, {}.__contains__, x=2, y=2) def test_oldargs0_0(self): {}.keys() |