I have a Python package that needs access to X11. I want to use Xvfb so that I do not have to have a real X11 installed on the build machines -- Hudson in this case. So, I would like to start a Xvfb server when py.test starts, use that one server for all the tests, then close it down.
How can I do that?
Note: I could start(stop) an Xvfb server in the SetUp(TearDown) in each test class but that has two problem: First, it is wasteful. Second, it does not work due to either strange Fatal IO error 0 (Success) on X server
if I terminate the server correctly or I get hanging Xvfb processes that do not die. This is using xvfbwrapper if anyone is interested.