summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_operator.py
diff options
context:
space:
mode:
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 57f3846..dbb8f9e 100644
--- a/Lib/test/test_operator.py
+++ b/Lib/test/test_operator.py
@@ -364,9 +364,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'
@@ -376,9 +376,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)