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

pytest plugin to display test execution output like a SPECIFICATION

Project Description


pytest plugin to display test execution output like a SPECIFICATION.

Available features

  • Format output to look like specification.
  • Group tests by classes.
  • Failed, passed and skipped are marked and colored.
  • Remove test_ and underscores for every test.
  • Method under test may be highlighted (method) like in example.

Output example

py.test --spec

    [PASS]  Execute returns positive return code

    [FAIL]  Execute returns negative return code

    [SKIP]  Execute returns something

    [FAIL]  The (execute_command) returns negative return code
    [PASS]  The (execute_command) returns positive return code
    [SKIP]  The (execute_command) returns something

Highlight method under test

Simple test definition is required (double ‘__’ characters before and after method) to put method under test between ‘<>’ characters e.g.

def test__execute_method__returns_something(self):

may be displayed as:

[PASS]  The (execute_command) returns something
[FAIL]  The (execute_command) returns something
[SKIP]  The (execute_command) returns something

This type of format provides clear information:

  • which method is under test
  • what kind of result should be expected

Continues Integration


Latest version of plugin is available in project artifacts.


pip install pytest_spec


Please feel free to present your idea by code example (pull request) or reported issues.

Future plans

  • Tests with other pytest plugins to check possible side-effects.
  • Work to make output even better.


pytest-spec - pytest plugin to display test execution output like a SPECIFICATION.

Copyright (C) 2014 Pawel Chomicki

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Release History

Release History

History Node


History Node


History Node


History Node


History Node


This version
History Node


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-spec-0.2.22.tar.gz (4.6 kB) Copy SHA256 Checksum SHA256 Source Jun 16, 2014

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