Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Test-ordering plugin for pytest

Project Description

A pytest plugin for ensuring tests within a class are run in source order.

Downloading

Release tarballs will be made available for download from Pagure Releases:
https://pagure.io/releases/python-pytest-sourceorder/
You can also install using pip:
https://pypi.python.org/pypi/pytest-sourceorder

The plugin is also available in Fedora repositories as python3-pytest-sourceorder.

Usage

When installed, test classes marked @pytest_sourceorder.ordered will have tests tun in the order of their definition.

Methods are ordered by line nuber of their definition, so spreading them between multiple files or otherwise defining them outside of their class might cause the plugin to order them wrong.

When inheriting from an ordered test class, the superclass’ methods will be run first (even if overridden), followed by the ones from subclasses. You generally do not want to apply an additional @ordered decorator to the subclasses – doing so will reset the inheritance-based ordering.

Contributing

The project is happy to accept patches! Please file any patches as Pull Requests on the project’s Pagure repo. Any development discussion should be in Pagure Pull Requests and Issues.

Release History

Release History

This version
History Node

0.5.1

History Node

0.5

History Node

0.4

History Node

0.1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pytest_sourceorder-0.5.1-py2.py3-none-any.whl (5.5 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Apr 11, 2017
pytest-sourceorder-0.5.1.tar.gz (3.3 kB) Copy SHA256 Checksum SHA256 Source Apr 11, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting