pytest plugin to display test execution output like a SPECIFICATION
Project description
pytest-spec
pytest plugin to display test execution output like a SPECIFICATION.
Available features
Format output to look like specification.
Group tests by classes and files
Failed, passed and skipped are marked and colored.
Remove test_ and underscores for every test.
Output example
py.test --spec test/test_results/test_as_class.py::TestResults [SKIP] Some method return none [FAIL] Some method returns false [PASS] Some method returns true test/test_results/test_as_functions.py [PASS] Some method returns true [FAIL] Some method returns false [SKIP] Some method return none
Configuration
spec_header_format
You can configure the format of the test headers by specifying a format string in your ini-file:
[pytest] spec_header_format = {path}:{class_name}
In addition to the {path} and {class_name} replacement fields, there is also {test_case} that holds a more human readable name.
spec_test_format
You can configure the format of the test results by specifying a format string in your ini-file:
[pytest] spec_test_format = [{result}] {name}
Continuous Integration
Download
Latest version of plugin is available in drone.io project artifacts.
Install
pip install pytest-spec
Contribution
Please feel free to present your idea by code example (pull request) or reported issues.
Contributors
dtk
Eric Carmichael
Future plans
Tests with other pytest plugins to check possible side-effects.
Work to make output even better.
License
pytest-spec - pytest plugin to display test execution output like a SPECIFICATION.
Copyright (C) 2014-2016 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file pytest-spec-1.1.0.tar.gz
.
File metadata
- Download URL: pytest-spec-1.1.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3039ac431df097c169a6bc40e7501f884efff077cf470ffb855315ba89ee29e7 |
|
MD5 | d1dd1fa1d16223b63a31cb0b8a00c5ad |
|
BLAKE2b-256 | 96d168ced04b24b93203db875e0123c288b5993732fda2be5f3859907e4a40a4 |