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)

defect

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.

  1. https://searchfox.org/firefox-main/source/testing/web-platform/tests/css/css-view-transitions/hit-test-unrelated-element.html
  2. 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.

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)

This is required to run reftests which depend on testdriver.

Assignee: nobody → james
Status: NEW → ASSIGNED
Flags: needinfo?(james)
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 144 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: