Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/encukou/pytest-sourceorder
https://github.com/encukou/pytest-sourceorder
Last synced: 26 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/encukou/pytest-sourceorder
- Owner: encukou
- License: gpl-3.0
- Created: 2014-11-28T20:28:29.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2021-09-01T14:43:45.000Z (about 3 years ago)
- Last Synced: 2023-03-11T13:19:27.366Z (over 1 year ago)
- Language: Python
- Size: 25.4 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.rst
- License: COPYING
Awesome Lists containing this project
README
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-sourceorderThe 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.Developer links
---------------* Bug tracker: https://pagure.io/python-pytest-sourceorder/issues
* Code browser: https://pagure.io/python-pytest-sourceorder/tree/master
* git clone https://pagure.io/python-pytest-sourceorder.git
* Unstable packages for Fedora: https://copr.fedoraproject.org/coprs/pviktori/pytest-plugins/.. _Pagure repo: https://pagure.io/python-pytest-sourceorder