I\'m currently foolish enough to try to maintaintain two parallel code bases for a Python desktop application, one using PyGObject introspection for GTK 3 and one using PyGTK fo
You can use a X11 framebuffer:
Xvfb :119 -screen 0 1024x768x16 &
export DISPLAY=:119
... run your tests
Be sure, to not enter gtk.main()
, since this would wait for mouse or keyboard input. You can use this pattern to let gtk handle all events:
def refresh_gui():
while gtk.events_pending():
gtk.main_iteration_do(block=False)
AFAIK you can't see your application, but you can test your callbacks.