pytest-xvfb | A pytest plugin to run Xvfb for tests | Plugin library
kandi X-RAY | pytest-xvfb Summary
kandi X-RAY | pytest-xvfb Summary
A pytest plugin to run Xvfb for tests.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Read the contents of a file .
pytest-xvfb Key Features
pytest-xvfb Examples and Code Snippets
Community Discussions
Trending Discussions on pytest-xvfb
QUESTION
Working on understanding how to go about automated unit testing for PySide2-based applications. However, whenever I attempt to initialize a QApplication
instance within the tests, be it through PySide2
itself or through pytest-qt
's qtbot fixture, travis-ci aborts the test. It works locally, however.
I've attempted using the qtbot
and qapp
fixtures from pytest-qt
, trying different travis-ci
distros like xenial
and trusty
, as well as including the pytest-xvfb
plugin as I've seen recommended by a similar stackoverflow question's answer, but nothing worked in any combination of the above.
ANSWER
Answered 2019-Nov-17 at 09:19I just figured this out for a similar project. I think this is related: Running pytest-qt on CircleCI
I tried to set QT_DEBUG_PLUGINS=1
as an environment variable in Travis-CI, but did not get any information out of that. However, I succeeded by adding
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install pytest-xvfb
You can use pytest-xvfb like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page