Quick fix for watchlist unit test failures when using Python 2.7+
authorlevin@chromium.org <levin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Oct 2011 22:02:35 +0000 (22:02 +0000)
committerlevin@chromium.org <levin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Oct 2011 22:02:35 +0000 (22:02 +0000)
Reviewed by Adam Barth.

Filed bug https://bugs.webkit.org/show_bug.cgi?id=69789 about a
better fix.

* Scripts/webkitpy/common/webkitunittest.py: Always use our
version of assertRaisesRegexp.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@97094 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/webkitpy/common/webkitunittest.py

index 3d482e4..06291ff 100644 (file)
@@ -1,3 +1,14 @@
+2011-10-10  David Levin  <levin@chromium.org>
+
+        Quick fix for watchlist unit test failures when using Python 2.7+
+        Reviewed by Adam Barth.
+
+        Filed bug https://bugs.webkit.org/show_bug.cgi?id=69789 about a
+        better fix.
+
+        * Scripts/webkitpy/common/webkitunittest.py: Always use our
+        version of assertRaisesRegexp.
+
 2011-10-10  Sheriff Bot  <webkit.review.bot@gmail.com>
 
         Unreviewed, rolling out r97082.
index a7478fd..afd9018 100644 (file)
@@ -34,9 +34,8 @@ import unittest
 
 class TestCase(unittest.TestCase):
     def setUp(self):
-        # For versions of Python before 2.7.
-        if not 'assertRaisesRegexp' in dir(self):
-            self.assertRaisesRegexp = self._assertRaisesRegexp
+        # FIXME: Only do this for versions of Python before 2.7.
+        self.assertRaisesRegexp = self._assertRaisesRegexp
 
     def _assertRaisesRegexp(self, regex_message, callable, *args):
         try: