RESOLVED FIXED 227327
[webkitcorepy] Add test suite with temp directory
https://bugs.webkit.org/show_bug.cgi?id=227327
Summary [webkitcorepy] Add test suite with temp directory
Jonathan Bedard
Reported 2021-06-23 16:05:08 PDT
We end up duplicating quite a bit of code which creates and deletes a temporary directory during unit testing. It's pretty easy to build a shared TestCase class which reduces our duplicated code.
Attachments
Patch (33.64 KB, patch)
2021-06-23 16:12 PDT, Jonathan Bedard
no flags
Patch (33.67 KB, patch)
2021-06-28 07:06 PDT, Jonathan Bedard
no flags
Patch (34.83 KB, patch)
2021-06-28 10:27 PDT, Jonathan Bedard
no flags
Patch for landing (36.05 KB, patch)
2021-06-28 11:45 PDT, Jonathan Bedard
no flags
Radar WebKit Bug Importer
Comment 1 2021-06-23 16:06:20 PDT
Jonathan Bedard
Comment 2 2021-06-23 16:12:34 PDT
Jonathan Bedard
Comment 3 2021-06-28 07:06:52 PDT
Stephanie Lewis
Comment 4 2021-06-28 09:24:59 PDT
Comment on attachment 432391 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=432391&action=review > Tools/Scripts/libraries/webkitcorepy/webkitcorepy/unittest.py:29 > +from unittest import TestCase whats the value in overriding the name? I think importing unitest and something like webkitunittest would be a lot clearer.
Jonathan Bedard
Comment 5 2021-06-28 09:44:40 PDT
(In reply to Stephanie Lewis from comment #4) > Comment on attachment 432391 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=432391&action=review > > > Tools/Scripts/libraries/webkitcorepy/webkitcorepy/unittest.py:29 > > +from unittest import TestCase > > whats the value in overriding the name? I think importing unitest and > something like webkitunittest would be a lot clearer. Mostly because then something importing it would be `from webkitcorepy.webkitunittest import <class>` which seemed redundant to me...would `from webkitcorepy.testing` be better?
Jonathan Bedard
Comment 6 2021-06-28 10:27:17 PDT
Jonathan Bedard
Comment 7 2021-06-28 11:45:37 PDT
Created attachment 432411 [details] Patch for landing
EWS
Comment 8 2021-06-28 12:57:23 PDT
Committed r279347 (239215@main): <https://commits.webkit.org/239215@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 432411 [details].
Note You need to log in before you can comment on or make changes to this bug.