[Webkit-unassigned] [Bug 36841] test-webkitpy needs full module path to run tests now

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 30 14:09:26 PDT 2010


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





--- Comment #3 from Chris Jerdonek <cjerdonek at webkit.org>  2010-03-30 14:09:26 PST ---
(In reply to comment #1)
> However it should be easy to restore the old behavior with a
> little tweaking to how we do our imports.

I'm not sure there's an easy fix that doesn't run into the issue I mentioned
above.

Note also that we don't do any imports ourselves now.  We are relying entirely
on the import facilities built into Python's unittest module.  For example, in
Ojan's use case in comment 1, we simply pass the command-line arguments to
unittest.main() as is:

if len(sys_argv) > 1 and not sys_argv[-1].startswith("-"):
    # Then explicit modules or test names were provided, which
    # the unittest module is equipped to handle.
    unittest.main(argv=sys_argv, module=None)
    # No need to return since unitttest.main() exits.

By the way, unittest's import facilities are themselves somewhat subtle.  For
instance, I rediscovered the following issue which is an outstanding bug in
Python 2.6:

http://bugs.python.org/issue7559#msg101867

(This issue makes it harder to track down bad import statements found while
running unit tests.)

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