Commits

Michael Foord committed 1ccdcc3

Remove use of hasattr in previous commit.

Comments (0)

Files changed (1)

unittest2/case.py

                 exc_info = sys.exc_info()
                 addExpectedFailure = getattr(result, 'addExpectedFailure', None)
 
-                if (hasattr(testMethod, 'expectedFailure') and
+                if (getattr(testMethod, 'expectedFailure', None) is not None and
                     addExpectedFailure is not None):
                     addExpectedFailure(self, exc_info)
                 else: