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.1 (2015-12-23)
Packaging bugfix
1.0.0 (2015-12-21)
Initial public release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file pytest-qt-app-1.0.1.tar.gz
.
File metadata
- Download URL: pytest-qt-app-1.0.1.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5381f5e35f2385b9a7270eeff391d1438a56bb5840894d804cda83898a22a003 |
|
MD5 | f69ba8cb135a0b438aac0d11f993f236 |
|
BLAKE2b-256 | db078f108f6515205ce7d93027a1a25a44f338a45cc6085f32e871a6d090a242 |
File details
Details for the file pytest_qt_app-1.0.1-py2.7.egg
.
File metadata
- Download URL: pytest_qt_app-1.0.1-py2.7.egg
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e551cc1257221a2728c623c13657c1691369f4013281fc63205e93b61ea682b5 |
|
MD5 | 2f4ab027b9a07dae8f08679820bcab45 |
|
BLAKE2b-256 | 564404b27da578b59aa045dda11cf13afd7c9057183ee40bac91059a48c0808c |
File details
Details for the file pytest_qt_app-1.0.1-py2-none-any.whl
.
File metadata
- Download URL: pytest_qt_app-1.0.1-py2-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 046824c3037b47d8e93c12f157a090182120c242e13f06644cf6ee75e9c5fb0f |
|
MD5 | 4c91776c35ef87b242633b2c6e466021 |
|
BLAKE2b-256 | cbdcb8278b559f5619486204e22108cad2021e44a0d67e21725ea21b64314992 |