Skip to main content

QT app fixture for py.test

Project description

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 (2015-12-21)

  • Initial public release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest-qt-app-1.0.0.tar.gz (2.6 kB view details)

Uploaded Source

Built Distributions

pytest_qt_app-1.0.0-py2.7.egg (2.8 kB view details)

Uploaded Source

pytest_qt_app-1.0.0-py2-none-any.whl (4.5 kB view details)

Uploaded Python 2

File details

Details for the file pytest-qt-app-1.0.0.tar.gz.

File metadata

File hashes

Hashes for pytest-qt-app-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3fdbb4c30a1c7a8a6fca977c2547e760b2c7674f8f6f10f1eeb244d61fb4f50a
MD5 373fa6292f198d8e07626874aec9bfad
BLAKE2b-256 aeee18a94c5a5128162ae644884ac6ade50ce772d86e7297db58d0a8d0218b01

See more details on using hashes here.

File details

Details for the file pytest_qt_app-1.0.0-py2.7.egg.

File metadata

File hashes

Hashes for pytest_qt_app-1.0.0-py2.7.egg
Algorithm Hash digest
SHA256 3ea32a7869392c5c1f6eb33619b76b77be39543dd9bbd4a6514b9502bcb80a23
MD5 4aafeae16599f834044f2ff79fd1a335
BLAKE2b-256 481a25af7255f5d9febf6e5e2ed5d346f642758332fe430623b6a8f7183b8e0b

See more details on using hashes here.

File details

Details for the file pytest_qt_app-1.0.0-py2-none-any.whl.

File metadata

File hashes

Hashes for pytest_qt_app-1.0.0-py2-none-any.whl
Algorithm Hash digest
SHA256 c40e38c74fe03432baf2440254c39bc4d6f0a0c0277e7e4657f8088097ab625a
MD5 2f8dc330faa03d3f641d270abf8e7b52
BLAKE2b-256 d6b0cbe2291868032d9582d7c73d205bd2f3e02532109db0c6cb9bcdf02e70c2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page