Closed mgorny closed 1 year ago
Sounds good. If you'd open a PR that would be awesome, else I'll do it when I have capacity.
Done. It seems that it was a drop-in replacement here ;-).
That said, I do wonder why you're calling Xvfb from within tests, if you run the whole test suite inside a Xvfb in the CI pipeline anyway.
The reason for the per-test Xvfb-wrapper is for when you run the tests locally. Otherwise when you run the testsuite it looks like you just navigated to a pirate website without an adblocker.
The reason for the per-test Xvfb-wrapper is for when you run the tests locally. Otherwise when you run the testsuite it looks like you just navigated to a pirate website without an adblocker.
Hmm but a "global" instance of Xvfb for the whole of the test suite (started via conftest.py
) would work for that as well, wouldn't it?
You're right, that would probably work too and might save a few seconds per run. I'll try it out the next time I mess around with the unit tests.
xvfbwrapper is no longer maintained — it has no commit activity since 2019, it has annoying race conditions and nobody to merge the fixes. Would you consider replacing it with another package?
My personal recommendation would be PyVirtualDisplay — it is actively maintained and uses a more robust approach to starting Xvfb (
-displayfd
). If you agree, I can prepare a pull request doing the replacement.We'd like to remove xvfbwrapper entirely from Gentoo.