RESOLVED FIXED Bug 235370
Move tests to pyfakefs from FileSystemMock
https://bugs.webkit.org/show_bug.cgi?id=235370
Summary Move tests to pyfakefs from FileSystemMock
Sam Sneddon [:gsnedders]
Reported 2022-01-19 11:18:54 PST
see https://github.com/jmcgeheeiv/pyfakefs This has a bunch of advantages over our current FileSystemMock: Avoids us having to maintain our own re-implementation (which currently has a variety of issues) Can configure it to emulate Windows/Linux/macOS behaviour on other systems, allowing us to test things still work on Windows more easily Provides a path away from our current FileSystem class towards using the standard library functions directly
Attachments
Patch (10.49 KB, patch)
2022-01-28 13:19 PST, Sam Sneddon [:gsnedders]
no flags
Radar WebKit Bug Importer
Comment 1 2022-01-19 12:24:04 PST
Sam Sneddon [:gsnedders]
Comment 2 2022-01-28 13:19:04 PST
Jonathan Bedard
Comment 3 2022-02-01 08:04:29 PST
Comment on attachment 450272 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=450272&action=review > Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_finder_legacy_unittest.py:57 > + self.setUpPyfakefs() I agree that using pyfakefs through the TestCaseMixin is the right thing to do for this class. I'm curious if you looked at the Patcher and considered it at all? Or was the Mixin just the natural choice because this particular set of tests was already using setup.
Sam Sneddon [:gsnedders]
Comment 4 2022-02-01 08:32:02 PST
Comment on attachment 450272 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=450272&action=review >> Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_finder_legacy_unittest.py:57 >> + self.setUpPyfakefs() > > I agree that using pyfakefs through the TestCaseMixin is the right thing to do for this class. I'm curious if you looked at the Patcher and considered it at all? Or was the Mixin just the natural choice because this particular set of tests was already using setup. Using Patcher requires reimplementing a lot of the TestCaseMixin machinery for very little gain.
EWS
Comment 5 2022-02-01 08:36:48 PST
Committed r288878 (246630@main): <https://commits.webkit.org/246630@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 450272 [details].
Note You need to log in before you can comment on or make changes to this bug.