BoboTiG / python-mss

An ultra fast cross-platform multiple screenshots module in pure Python using ctypes.
https://pypi.org/project/mss/
MIT License
987 stars 88 forks source link

tests: Use PyVirtualDisplay instead of xvfbwrapper #249

Closed mgorny closed 1 year ago

mgorny commented 1 year ago

Changes proposed in this PR

Use the more modern PyVirtualDisplay package instead of xvfbwrapper to run Xvfb. Most importantly, it uses the more robust approach of starting Xvfb with -displayfd and it is actively maintained upstream. Unfortunately, this does not seem sufficient to entirely eliminate random test failures.

It is very important to keep up to date tests and documentation.

Is your code right?

mgorny commented 1 year ago

Well, let's see how it fares on CI. Sometimes I still get a single test failure, at other times all pass. Perhaps the only way to really avoid that is to use something like pytest-rerunfailures to retry 2 or 3 times on failure.

mgorny commented 1 year ago

Thanks a lot!

BoboTiG commented 1 year ago

Thanks to you :)