Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 49a2255d422e0799beb73477d56db72d74722552
https://github.com/WebKit/WebKit/commit/49a2255d422e0799beb73477d56db72d74722552
Author: Elliott Williams <[email protected]>
Date: 2025-06-23 (Mon, 23 Jun 2025)
Changed paths:
M Tools/Scripts/libraries/webkitapipy/pyproject.toml
A Tools/Scripts/libraries/webkitapipy/webkitapipy/mypy_unittest.py
M Tools/Scripts/libraries/webkitapipy/webkitapipy/program.py
M Tools/Scripts/libraries/webkitapipy/webkitapipy/sdkdb.py
A Tools/Scripts/libraries/webkitapipy/webkitapipy/sdkdb_unittest.py
A Tools/Scripts/libraries/webkitapipy/webkitapipy_additions/program.pyi
M Tools/Scripts/webkitpy/test/main.py
Log Message:
-----------
[webkitapipy] Add initial unit tests and hook into test-webkitpy
https://bugs.webkit.org/show_bug.cgi?id=294698
Reviewed by Sam Sneddon.
audit-spi gets decent coverage via the iOS build, but as we fix bugs
it's valuable to be able to write regression tests. Add unit tests to
the library and teach `test-webkitpy` to run them.
To start, contribute tests for the recent windowing logic (#45871) and
ObjC class ingestion (#46874) bug fixes. These are by no means
exhaustive, but seem like a good place to start.
Also add a suite which runs mypy to check the library's type
annotations. Since changes to type annotations can cause failures at
distant call sites, I believe it's appropriate to treat them as unit
tests rather than a style check.
* Tools/Scripts/libraries/webkitapipy/mypy.ini: Added. Makes type
checking succeed in internal builds.
* Tools/Scripts/libraries/webkitapipy/webkitapipy/mypy_unittest.py: Added.
* Tools/Scripts/libraries/webkitapipy/webkitapipy/program.py: Add pragma
to avoid a typecheck error in open source, when webkitapipy_additions
is not available.
* Tools/Scripts/libraries/webkitapipy/webkitapipy/sdkdb.py:
(SDKDB.__del__): Support graceful exit when the database has been
deleted on disk, such as when TestSDKDB deletes the temporary file
before running `SDKDB.__del__()`.
(SDKDB._add_api_report): Split out from add_partial_sdkdb so that tests
can call it without invoking the Mach-O reader.
* Tools/Scripts/libraries/webkitapipy/webkitapipy/sdkdb_unittest.py: Added.
* Tools/Scripts/libraries/webkitapipy/webkitapipy_additions.pyi: Added
type stubs for the internal library.
* Tools/Scripts/webkitpy/test/main.py:
(main): Auto-install mypy and its runtime dependencies.
Canonical link: https://commits.webkit.org/296534@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes