[issue1876] bogus attrgetter test in test_operator

2008-01-20 Thread Georg Brandl
Georg Brandl added the comment: As seen from the __eq__ example, the exception should be SyntaxError. With both changes, it works fine again in r60142. As for why the test is there, maybe the operator functions had lax error checking once. -- nosy: +georg.brandl resolution: -> fixed st

[issue1876] bogus attrgetter test in test_operator

2008-01-20 Thread Antoine Pitrou
New submission from Antoine Pitrou: In test_operator we find the following lines: class C(object): def __getattr(self, name): raise SyntaxError self.failUnlessRaises(AttributeError, operator.attrgetter('foo'), C()) Obviously "__getattr" has no effect.