Skip to main content

pytest-xvfb

See Build Status on Travis CI See Build Status on AppVeyor

A pytest plugin to run Xvfb for tests.


Installation

You can install “pytest-xvfb” via pip from PyPI:

$ pip install pytest-xvfb

Usage

This plugin runs your testsuite with Xvfb to avoid popping up windows during GUI tests or allow them to run on systems without a display.

If Xvfb is not installed, it does nothing so your tests will still work.

You can also pass --no-xvfb to explicitly turn off Xvfb (e.g. to visually inspect a failure).

You can mark tests with @pytest.mark.no_xvfb to skip them when they’re running with Xvfb.

A xvfb fixture is available with the following attributes:

  • width: The configured width of the screen.

  • height: The configured height of the screen.

  • colordepth: The configured colordepth of the screen.

  • args: The arguments to be passed to Xvfb.

  • display: The display number (as int) which is used.

Contributing

Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.

License

Distributed under the terms of the MIT license, “pytest-xvfb” is free and open source software

Thanks

This pytest plugin was generated with Cookiecutter along with @hackebrot’s Cookiecutter-pytest-plugin template.

Thanks to @cgoldberg for xvfbwrapper which was the inspiration for this project.

Issues

If you encounter any problems, please file an issue along with a detailed description.

Metadata

Release files for pytest-xvfb 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytest-xvfb 0.1.0
File Size Uploaded Provenance Actions
pytest-xvfb-0.1.0.tar.gz 3.9 kB Without provenance Details for pytest-xvfb-0.1.0.tar.gz

Release files / pytest-xvfb-0.1.0.tar.gz

Download URL pytest-xvfb-0.1.0.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
aafe5136813b92fed05f0878914ab9245c9d70f6d48d011ab772910879878f30
BLAKE2b-256 checksum
How to use checksums
aea948329a16374c1936969c8bef59e5882171147e3ee86f16f7465381e6743d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for pytest-xvfb 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page