Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pytest-sourceorder

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pytest-sourceorder

Test-ordering plugin for pytest

  • 0.6.0
  • PyPI
  • Socket score

Maintainers
1

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.

To release, update version in setup.py, add a Git tag like "v0.3", and run make tarball. Running make upload will put the tarball to Fedora Hosted and PyPI, and a SRPM on Fedorapeople, if you have the rights. Running make release will upload and fire a COPR build.

.. _Pagure repo: https://pagure.io/python-pytest-sourceorder

Changelog

v0.6 (2021-09-01)


* Added support for decorated methods
  (thanks to Sergey Orlov)


v0.5.1 (2017-04-11)

Packaging improvements only

v0.5 (2016-01-26)


* Added support for parametrized tests under Python 3


v0.4 (2015-01-26)
  • Python 3 compatibility

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc