[Webkit-unassigned] [Bug 48614] webkitpy.layout_tests.run_webkit_tests_unittest.MainTest gets wedged on Windows XP/Cygwin 1.5/Python 2.5.2
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Nov 2 12:30:00 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=48614
--- Comment #17 from Eric Seidel <eric at webkit.org> 2010-11-02 12:30:00 PST ---
(From update of attachment 72671)
View in context: https://bugs.webkit.org/attachment.cgi?id=72671&action=review
abarth let you off easy. :)
> WebKitTools/ChangeLog:18
> + unittest.skip_if decorator added in Python 3.1.
false. it's skipIf and added in 2.7: http://docs.python.org/library/unittest.html#unittest.skipIf
> WebKitTools/Scripts/webkitpy/test/skip.py:28
> +def skip_if(klass, condition, message=None, logger=None):
We should note that this exists in 2.7: http://docs.python.org/library/unittest.html#unittest.skipIf
Why does your decorator look so different from the one I wrote for memoized? Is this a "new" style?
I guess this is a class decorator not a function decorator?
> WebKitTools/Scripts/webkitpy/test/skip_unittest.py:41
> +
> + self.old_level = self.logger.level
> + self.logger.setLevel(logging.INFO)
> +
> + self.old_propagate = self.logger.propagate
> + self.logger.propagate = False
> +
> + self.log_stream = StringIO.StringIO()
> + self.handler = logging.StreamHandler(self.log_stream)
So this is using "INFO" because currently INFO isnt' logged? Maybe this integrates with dpranke's attempt to make OutputCapture understand python logging.py? OutputCapture is our current way of grabbing output during a unit test and should be taught how to grab logging.py output too, by teaching it about the wekbit-patch logging handler (currently > INFO) and how to disable/remove it while an OutputCapture is in place.
> WebKitTools/Scripts/webkitpy/test/skip_unittest.py:59
> + def create_fixture_class(self):
> + class TestSkipFixture(object):
> + def __init__(self, callback):
> + self.callback = callback
> +
> + def test_foo(self):
> + self.callback()
> +
> + return TestSkipFixture
I'm confused why not just declare this at the top of the file? Creating it dynamically in this method doesn't make much sense to me?
> WebKitTools/Scripts/webkitpy/test/skip_unittest.py:65
> + klass = skip_if(self.create_fixture_class(), False, 'Should not see this message.', logger=self.logger)
Would have been nice to see an example of it using the decorator syntax.
> WebKitTools/Scripts/webkitpy/test/skip_unittest.py:75
> +
two spaces.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list