Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

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 will not be recognised.

  • Add a buildout section to create the py.test runner:

    parts += pytest
    recipe = zc.recipe.egg
    eggs = gocept.pytestlayer
           <YOUR PACKAGE HERE>
  • Write a creating fixtures for your layers:

    from gocept.pytestlayer import fixture

    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 inside a directory that is a parent of all directories that contain tests that use layers, so it is found by pytest whenever needed.

Change log for gocept.pytestlayer

1.0 (2013-08-28)

  • Initial release.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
gocept.pytestlayer-1.0.tar.gz (14.9 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page