Integration of zope.testrunner-style test layers into the py.test framework
Project description
The gocept.pytestlayer distribution
Integration of zope.testrunner-style test layers into the py.test framework
This package is compatible with Python version 2.7.
Quick start
Make sure your test files follow the conventions of py.test’s test discovery
In particular, a file named tests.py will not be recognised.
Add a buildout section to create the py.test runner:
[buildout] parts += pytest [pytest] recipe = zc.recipe.egg eggs = gocept.pytestlayer pytest <YOUR PACKAGE HERE>
Write a conftest.py creating fixtures for your layers:
from gocept.pytestlayer import fixture globals().update(fixture.create( "mypackage.testing.Layer1", "mypackage.testing.Layer2", ))
As long as there are any fixtures missing, the plugin will tell you about layers that need to be included. Calling py.test -x will make this process faster (as it makes the runner stop at the first error).
Make sure to put the conftest.py inside a directory that is a parent of all directories that contain tests that use layers, so it is found by pytest whenever needed.
Developing gocept.pytestlayer
- Author:
gocept <mail@gocept.com>, Godefroid Chapelle <gotcha@bubblenet.be>
- Online documentation:
- PyPI page:
- Issues:
- Source code:
- Current change log:
https://bitbucket.org/gocept/gocept.pytestlayer/raw-file/tip/CHANGES.txt
Change log for gocept.pytestlayer
1.0 (2013-08-28)
Initial 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
File details
Details for the file gocept.pytestlayer-1.0.tar.gz
.
File metadata
- Download URL: gocept.pytestlayer-1.0.tar.gz
- Upload date:
- Size: 14.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 259bb9322307c27cc4de32097bf8cc204a9f200e0fa4801803e389a05b2c20bb |
|
MD5 | ffa7449ff583f172e82935aba56f3e1e |
|
BLAKE2b-256 | 5a1fb11aee9e52caada2734edd30ba80d8c540beb0738cdaba31528ad49b7efc |