Closed danc86 closed 1 month ago
With these changes, the only remaining test case in the regression test suite which makes a network request is test_check_cjk_vertical_metrics_regressions()
.
If you like this approach of using requests-mock, I could refactor the remote_styles
condition to also use requests to download the fonts zip file, and then update test_check_cjk_vertical_metrics_regressions()
to return a mock zip file in the tests.
That would allow the complete test suite to run without making any network requests.
Hey, @danc86, it took me a long time to do it, but here it is: reviewed and merged! ;-)
Description
I'm working on packaging fontbakery in nixpkgs, which requires that the test suite run without network access. I found a few tests which intentionally make network calls, but in most of them it seems desirable to mock out requests to live services. This will make them faster and more reproducible, and lets them run in an environment like nixpkgs where they are sandboxed from the network.
Checklist
CHANGELOG.md