Bug 224627 - scm_unittest.py fails at import-time on Python 2
Summary: scm_unittest.py fails at import-time on Python 2
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sam Sneddon [:gsnedders]
URL:
Keywords: InRadar
Depends on:
Blocks: 224638
  Show dependency treegraph
 
Reported: 2021-04-15 15:14 PDT by Sam Sneddon [:gsnedders]
Modified: 2021-04-22 17:35 PDT (History)
4 users (show)

See Also:


Attachments
Patch (4.60 KB, patch)
2021-04-15 15:18 PDT, Sam Sneddon [:gsnedders]
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Sneddon [:gsnedders] 2021-04-15 15:14:52 PDT
This isn't run by default (because it's too slow), but as a result we don't even try to import the tests and this has led to us regressing our ability to run them.

Notably, ./Tools/Scripts/test-webkitpy-python2 --all currently fails:

Checking imports ...Failed to import webkitpy.common.checkout.scm.scm_unittest:
Failed to import webkitpy.common.checkout.scm.scm_unittest:
  Traceback (most recent call last):
  Traceback (most recent call last):
    File "/Volumes/gsnedders/projects/Safari/OpenSource/Tools/Scripts/webkitpy/test/main.py", line 290, in _check_imports
    File "/Volumes/gsnedders/projects/Safari/OpenSource/Tools/Scripts/webkitpy/test/main.py", line 290, in _check_imports
      __import__(name)
      __import__(name)
    File "/Volumes/gsnedders/projects/Safari/OpenSource/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py", line 38, in <module>
    File "/Volumes/gsnedders/projects/Safari/OpenSource/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py", line 38, in <module>
      import pathlib
      import pathlib
  ImportError: No module named pathlib
  ImportError: No module named pathlib

As part of my medium-term goal of migrating us to using pytest where we're likely to skip specific slow tests rather than merely doing this at a module level, we should make sure this is importable.
Comment 1 Sam Sneddon [:gsnedders] 2021-04-15 15:18:25 PDT
Created attachment 426142 [details]
Patch
Comment 2 EWS 2021-04-15 16:05:04 PDT
Committed r276083 (236595@main): <https://commits.webkit.org/236595@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 426142 [details].
Comment 3 Ryan Haddad 2021-04-22 17:35:54 PDT
rdar://76735334