summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_operator.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-01-20 14:31:27 (GMT)
committerGeorg Brandl <georg@python.org>2008-01-20 14:31:27 (GMT)
commit6f7e2d0a30ff60122516ecb5120444f87642985c (patch)
tree7fd4a82893ddcdea4f34a1f053c6fa60d240f2ad /Lib/test/test_operator.py
parent487235109bba0cd0b05cb38569a44ea2296c29b0 (diff)
downloadcpython-6f7e2d0a30ff60122516ecb5120444f87642985c.zip
cpython-6f7e2d0a30ff60122516ecb5120444f87642985c.tar.gz
cpython-6f7e2d0a30ff60122516ecb5120444f87642985c.tar.bz2
#1876: fix typos in test_operator.
Diffstat (limited to 'Lib/test/test_operator.py')
-rw-r--r--Lib/test/test_operator.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_operator.py b/Lib/test/test_operator.py
index 085f8c4..a60ceb6 100644
--- a/Lib/test/test_operator.py
+++ b/Lib/test/test_operator.py
@@ -382,9 +382,9 @@ class OperatorTestCase(unittest.TestCase):
self.assertRaises(TypeError, operator.attrgetter('x', (), 'y'), record)
class C(object):
- def __getattr(self, name):
+ def __getattr__(self, name):
raise SyntaxError
- self.failUnlessRaises(AttributeError, operator.attrgetter('foo'), C())
+ self.failUnlessRaises(SyntaxError, operator.attrgetter('foo'), C())
def test_itemgetter(self):
a = 'ABCDE'
@@ -394,9 +394,9 @@ class OperatorTestCase(unittest.TestCase):
self.assertRaises(IndexError, f, a)
class C(object):
- def __getitem(self, name):
+ def __getitem__(self, name):
raise SyntaxError
- self.failUnlessRaises(TypeError, operator.itemgetter(42), C())
+ self.failUnlessRaises(SyntaxError, operator.itemgetter(42), C())
f = operator.itemgetter('name')
self.assertRaises(TypeError, f, a)