Closed
Bug 1987010
Opened 1 year ago
Closed 1 year ago
Test ERROR because "from PIL import Image" after importing testdriver.js
Categories
(Testing :: web-platform-tests, defect)
Testing
web-platform-tests
Tracking
(firefox144 fixed)
RESOLVED
FIXED
144 Branch
| Tracking | Status | |
|---|---|---|
| firefox144 | --- | fixed |
People
(Reporter: boris, Assigned: jgraham)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
This happened when I was trying to debug these two wpt tests on local machine.
- https://searchfox.org/firefox-main/source/testing/web-platform/tests/css/css-view-transitions/hit-test-unrelated-element.html
- https://searchfox.org/firefox-main/source/testing/web-platform/tests/css/css-view-transitions/hit-test-unpainted-element.html
I always saw the error message like this:
Error Summary
-------------
ERROR /css/css-view-transitions/hit-test-unrelated-element.html - Traceback (most recent call last):
File "/Users/boris/Projects/firefox/gecko/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/base.py", line 322, in run_test
result = self.do_test(test)
File "/Users/boris/Projects/firefox/gecko/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/executormarionette.py", line 1167, in do_test
result = self.implementation.run_test(test)
File "/gecko/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/base.py", line 550, in run_test
is_pass, page_idx = self.check_pass(hashes, screenshots, urls, relation, fuzzy)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/gecko/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/base.py", line 472, in check_pass
max_per_channel, pixels_different = self.get_differences(comparison_screenshots,
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
urls,
^^^^^
page_idx if len(hashes) > 1 else None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/gecko/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/base.py", line 493, in get_differences
from PIL import Image, ImageChops, ImageStat
ModuleNotFoundError: No module named 'PIL'
After I removed the usage of test_driver and /resources/testdriver.js, the error disappeared.
I cannot just pip3 install Image on my machine because it seems I have to tweak the virtual environment for wpt.
| Reporter | ||
Comment 1•1 year ago
|
||
HI James,
I noticed you move this line (i.e. from PIL import Image) in Bug 1539181. It seems we have to use this module now in WPT. Is there any easy way to fix this test error on local machine? This happened on both mac and linux, and TYLin can reproduce this issue on his local machine (mac and linux).
Flags: needinfo?(james)
| Assignee | ||
Comment 2•1 year ago
|
||
This is required to run reftests which depend on testdriver.
Updated•1 year ago
|
Assignee: nobody → james
Status: NEW → ASSIGNED
| Assignee | ||
Updated•1 year ago
|
Flags: needinfo?(james)
Pushed by james@hoppipolla.co.uk:
https://github.com/mozilla-firefox/firefox/commit/15f34c4274c1
https://hg.mozilla.org/integration/autoland/rev/5fbd3c3edee2
Install Pillow in wpt virtualenv, r=Sasha
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
status-firefox144:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 144 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•