https://github.com/man-group/pytest-plugins
A grab-bag of nifty pytest plugins
https://github.com/man-group/pytest-plugins
Last synced: 8 days ago
JSON representation
A grab-bag of nifty pytest plugins
- Host: GitHub
- URL: https://github.com/man-group/pytest-plugins
- Owner: man-group
- License: mit
- Created: 2015-08-14T07:52:32.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2025-01-02T18:11:11.000Z (6 months ago)
- Last Synced: 2025-06-16T10:46:38.136Z (17 days ago)
- Language: Python
- Homepage:
- Size: 10.9 MB
- Stars: 590
- Watchers: 20
- Forks: 84
- Open Issues: 44
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE
Awesome Lists containing this project
README
# A goody-bag of nifty plugins for [pytest](https://pytest.org)
OS | Build | Coverage |
------ |------------------------------------------------------------------------------------------------------------------------------------------------------------------| -------- |
 | [](https://circleci.com/gh/man-group/pytest-plugins/tree/master) | [](https://coveralls.io/github/manahl/pytest-plugins?branch=master)
 | [](https://circleci.com/gh/man-group/pytest-plugins/tree/master) |Plugin | Description | Supported OS |
------ | ----------- | ------------ |
| [pytest-server-fixtures](pytest-server-fixtures) | Extensible server-running framework with a suite of well-known databases and webservices included | 
| [pytest-shutil](pytest-shutil) | Unix shell and environment management tools |
| [pytest-profiling](pytest-profiling) | Profiling plugin with tabular heat graph output and gprof support for C-Extensions |
| [pytest-devpi-server](pytest-devpi-server) | DevPI server fixture |
| [pytest-pyramid-server](pytest-pyramid-server) | Pyramid server fixture |
| [pytest-webdriver](pytest-webdriver) | Selenium webdriver fixture |
| [pytest-virtualenv](pytest-virtualenv) | Virtualenv fixture | 
| [pytest-qt-app](pytest-qt-app) | PyQT application fixture |
| [pytest-listener](pytest-listener) | TCP Listener/Reciever for testing remote systems | 
| [pytest-git](pytest-git) | Git repository fixture | 
| [pytest-svn](pytest-svn) | SVN repository fixture |
| [pytest-fixture-config](pytest-fixture-config) | Configuration tools for Py.test fixtures | 
| [pytest-verbose-parametrize](pytest-verbose-parametrize) | Makes py.test's parametrize output a little more verbose |## Developing these plugins
All of these plugins share setup code and configuration so there is a top-level Makefile to
automate process of setting them up for test and development.### Pre-requisites
You have `python` installed on your path, preferably using a `virtualenv`
### Makefile targets
To install all dependencies and set up all of the packages for development simply run:
```bash
make develop
```To install all the packages as wheel distributions:
```bash
make install
```To run all the tests:
```bash
make test
```## Vagrant
Some of the plugins have complex dependencies, particularly `pytest-server-fixtures`.
To make it easier to develop, there is a `Vagrantfile` which will setup a virtual machine
with all the dependencies installed to run the tests.To set up the environment in Vagrant (requires virtualbox) and run the tests:
```bash
$ vagrant up
$ vagrant ssh# ..... inside vagrant ....
. venv/bin/activate
cd src
make develop
make test
```## `foreach.sh`
To run a command in each of the package directories, use the `foreach.sh` script.
This example will build all the wheel distributions:```bash
./foreach.sh python setup.py bdist_wheel
```### Only-Changed mode
To run a command only on packages that have changed since the last tagged release, use `--changed`.
This example will only upload packages that need releasing:```bash
./foreach.sh python setup.py bdist_wheel upload
```### Quiet mode
To run a command with no extra output other than from what you run, use `--quiet`
```bash
./foreach.sh --quiet grep PY3
```