def _run_server(): s = ServerDisplay() e = s.get_event_loop() source = e.add_timer(_kill_server, data=s) source.timer_update(500) s.add_socket() s.run() s.destroy()
def test_display_socket(): """Test that we can create a socket and have a client connect to it""" s = ServerDisplay() s.add_socket("wayland-0") with pytest.raises(Exception): s.add_socket("wayland-0") c = ClientDisplay() c.connect() assert c._ptr c.disconnect() s.destroy()