RESOLVED FIXED 62943
test-webkitpy --all errors out because scm_unittest.py can't find module checkout
https://bugs.webkit.org/show_bug.cgi?id=62943
Summary test-webkitpy --all errors out because scm_unittest.py can't find module chec...
Daniel Bates
Reported 2011-06-18 16:38:21 PDT
When I ran test-webkitpy --all today, I got the following error: atlas:WebKit dbates$ Tools/Scripts/test-webkitpy --all test-webkitpy: INFO Suppressing most webkitpy logging while running unit tests. test-webkitpy: WARNING You are testing webkitpy with a Python version (2.6.1) higher than the minimum version (2.5) it was meant to support. test-webkitpy: WARNING Skipping tests in Tools/QueueStatusServer due to failure (No module named dev_appserver). This module is optional. The failure is likely due to a missing Google AppEngine install. (http://code.google.com/appengine/downloads.html) Traceback (most recent call last): File "Tools/Scripts/test-webkitpy", line 266, in <module> Tester().run_tests(sys.argv, external_package_paths) File "/Users/dbates/Desktop/WebKit/Tools/Scripts/webkitpy/test/main.py", line 160, in run_tests __import__(module) File "/Users/dbates/Desktop/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py", line 48, in <module> from .checkout import Checkout ImportError: No module named checkout
Attachments
Patch (reference checkout module in parent directory) (1.33 KB, patch)
2011-06-18 16:53 PDT, Daniel Bates
no flags
[Alternative] Patch (remove explicit import of checkout module) (1.35 KB, patch)
2011-06-18 16:54 PDT, Daniel Bates
no flags
Daniel Bates
Comment 1 2011-06-18 16:53:14 PDT
Created attachment 97709 [details] Patch (reference checkout module in parent directory) I was not sure whether to remove the "from .checkout import Checkout" (since it's imported in <http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/checkout/__init__.py?rev=85452>) or to change it to read "from ..checkout import Checkout" (so that it references the module which is in our parent directory. I mean, we seem to explicitly import modules even though they appear in a __init__.py. For example, in scm_unittests.py we import from module detection, git, and svn even though these identical imports are in <http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/checkout/scm/__init__.py?rev=85449> (why?) What is the best practice for this?
Daniel Bates
Comment 2 2011-06-18 16:54:29 PDT
Created attachment 97710 [details] [Alternative] Patch (remove explicit import of checkout module) Alternative patch to remove the explicit import of the checkout module in scm_unittests.py since we import it when checkout/__init__.py is processed.
Adam Barth
Comment 3 2011-06-22 21:47:01 PDT
Comment on attachment 97710 [details] [Alternative] Patch (remove explicit import of checkout module) This one is better. Really we shouldn't be importing it in __init__, but that's another story.
WebKit Review Bot
Comment 4 2011-06-22 22:33:17 PDT
Comment on attachment 97710 [details] [Alternative] Patch (remove explicit import of checkout module) Clearing flags on attachment: 97710 Committed r89532: <http://trac.webkit.org/changeset/89532>
WebKit Review Bot
Comment 5 2011-06-22 22:33:21 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.