skip to navigation
skip to content

pytest-qt-app 1.0.1

QT app fixture for py.test

Set up a Q Application for QT with an X-Window Virtual Framebuffer (Xvfb).

Installation

Install using your favourite package installer:

pip install pytest-qt-app
# or
easy_install pytest-qt-app

Enable the fixture explicitly in your tests or conftest.py (not required when using setuptools entry points):

pytest_plugins = ['pytest_qt_app']

Configuration

The fixtures are configured using the following evironment variables:

Setting Description Default
SERVER_FIXTURES_XVFB Xvfb server executable /usr/bin/Xvfb

Usage

Here’s a little test that shows it working:

from PyQt4 import Qtgui

def test_q_application(q_application):
    # This shows the display is connected properly to the Xvfb
    assert QtGui.QX11Info.display()

Changelog

1.0.1 (2015-12-23)

  • Packaging bugfix

1.0.0 (2015-12-21)

  • Initial public release
 
File Type Py Version Uploaded on Size
pytest-qt-app-1.0.1.tar.gz (md5) Source 2015-12-23 3KB
pytest_qt_app-1.0.1-py2-none-any.whl (md5) Python Wheel 2.7 2015-12-23 4KB
pytest_qt_app-1.0.1-py2.7.egg (md5) Python Egg 2.7 2015-12-23 2KB