[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 13:01:21 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=48614





--- Comment #19 from Eric Seidel <eric at webkit.org>  2010-11-02 13:01:21 PST ---
(In reply to comment #18)
> (From update of attachment 72671 [details])
> I assume the decorator looks different because it is a class decorator.

What does the class decorator syntax look like?  I wonder if we want a class decorator or just function decorators like unittest seems to have?


> >> WebKitTools/Scripts/webkitpy/test/skip_unittest.py:59
> >> +        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?
> 
> The decorator modifies the class itself. Since we want to test skip_if twice (once with True and once with False) we need to have two different classes so that the tests don't interfere with each other. Maybe I should have added a comment.

Yeah, I'm just not sure what a "class decorator" looks like, and I'm not sure we want one over method decorators.

We could basically write our own wkunittest.py module, and then use things like this via:
@wkunittest.skipIf(condition)

I think it would be *super awesome* to be able to use more of the new skip* stuff from unittest, so I'm glad you've started us down that path.  I just think we should try to be as much like the stuff coming in python 2.7 instead of inventing our own syntax.

> >> 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.
> 
> My understanding is that class decorator syntax wasn't added until Python 2.6.

http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/webkitpy/common/memoized.py
seems to work with 2.5. :)

-- 
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