summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_call.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-03-04 08:25:44 (GMT)
committerRaymond Hettinger <python@rcn.com>2004-03-04 08:25:44 (GMT)
commit31017aed36a5c5b0e4b16ca58bea09c9ce360134 (patch)
tree766d70bb4fbb6878a71c81fc3874515cfcbc8aa8 /Lib/test/test_call.py
parent6c79a518e70ea8e45e3287573d99c648ae3cb21b (diff)
downloadcpython-31017aed36a5c5b0e4b16ca58bea09c9ce360134.zip
cpython-31017aed36a5c5b0e4b16ca58bea09c9ce360134.tar.gz
cpython-31017aed36a5c5b0e4b16ca58bea09c9ce360134.tar.bz2
SF #904720: dict.update should take a 2-tuple sequence like dict.__init_
(Championed by Bob Ippolito.) The update() method for mappings now accepts all the same argument forms as the dict() constructor. This includes item lists and/or keyword arguments.
Diffstat (limited to 'Lib/test/test_call.py')
-rw-r--r--Lib/test/test_call.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/Lib/test/test_call.py b/Lib/test/test_call.py
index 99554c7..f3c7c8c 100644
--- a/Lib/test/test_call.py
+++ b/Lib/test/test_call.py
@@ -86,41 +86,41 @@ class CFunctionCalls(unittest.TestCase):
self.assertRaises(TypeError, {}.keys, x=2, y=2)
def test_oldargs1_0(self):
- self.assertRaises(TypeError, {}.update)
+ self.assertRaises(TypeError, [].count)
def test_oldargs1_1(self):
- {}.update({})
+ [].count(1)
def test_oldargs1_2(self):
- self.assertRaises(TypeError, {}.update, {}, 1)
+ self.assertRaises(TypeError, [].count, 1, 2)
def test_oldargs1_0_ext(self):
try:
- {}.update(*())
+ [].count(*())
except TypeError:
pass
else:
raise RuntimeError
def test_oldargs1_1_ext(self):
- {}.update(*({},))
+ [].count(*(1,))
def test_oldargs1_2_ext(self):
try:
- {}.update(*({}, 2))
+ [].count(*(1, 2))
except TypeError:
pass
else:
raise RuntimeError
def test_oldargs1_0_kw(self):
- self.assertRaises(TypeError, {}.update, x=2)
+ self.assertRaises(TypeError, [].count, x=2)
def test_oldargs1_1_kw(self):
- self.assertRaises(TypeError, {}.update, {}, x=2)
+ self.assertRaises(TypeError, [].count, {}, x=2)
def test_oldargs1_2_kw(self):
- self.assertRaises(TypeError, {}.update, x=2, y=2)
+ self.assertRaises(TypeError, [].count, x=2, y=2)
def test_main():