[Webkit-unassigned] [Bug 111513] Create a script to import W3C tests

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat May 4 03:12:59 PDT 2013


--- Comment #31 from Zan Dobersek <zandobersek at gmail.com>  2013-05-04 03:11:21 PST ---
(From update of attachment 200462)
View in context: https://bugs.webkit.org/attachment.cgi?id=200462&action=review

The webkitpy.w3c.test_importer_unittest.TestImporterTest.test_ImportDirWithNoTests unit test is failing after the patch landed in r149547.

A couple of problems are noted in the inline comments.

> Tools/Scripts/webkitpy/w3c/test_converter.py:190
> +                print 'converting ' + unprefixed_prop + ' -> ' + prefixed_prop

Printing the progress messages through the print statement causes unnecessary output when running the tests. Using Python loggers (i.e. _log.info and similar) instead would be much better, capturing the output of the tests. This isn't critical, but it is rather annoying.

> Tools/Scripts/webkitpy/w3c/test_importer.py:345
> +                    if options.no_overwrite is True and os.path.exists(new_filepath):

The unit test fails here due to no global options object available. Referencing self.options instead fixes this.
The alternative would be to define the global options object, as done in test_parser_unittest.py.

> Tools/Scripts/webkitpy/w3c/test_importer_unittest.py:47
> +        importer = TestImporter(dir_with_no_tests, None)

If switched to using self.options to check for the no_overwrite option in TestImporter.import_tests, you can pass a MockOptions object as the options parameter. For instance, MockOptions(no_overwrite=False) should do the trick.

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