A python test spec based on pytest
Project description
The pySpec plugin transforms the pytest output into RSpec.
Just nest your tests using classes and include docstring for each class and test. You can create any nested levels.
The following test sample:
import pytest
class TestHouse:
"a House"
def test_door(self):
"has a door"
assert 1 == 1
class TestTwoFloors:
"with two floors"
def test_stairs(self):
"has stairs"
assert 1 == 1
def test_second_floor(self):
"has second floor"
assert 1 == 1
Generates the following output:
test/test_sample.py
A house
Has a door .
A house
With two floors
Has stairs .
Has second floor . [100%]
Installing and running pySpec
pip install pytest-pyspec
pytest --pyspec
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
pytest_pyspec-0.2.4.tar.gz
(15.5 kB
view hashes)
Built Distribution
Close
Hashes for pytest_pyspec-0.2.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6152fec7f9e17d58376c553e28c58a2228a8374e38a8a2f86a78abf384e45389 |
|
MD5 | a7eaf4feae0ff40e1ad43d6a567e0c81 |
|
BLAKE2b-256 | 93845c107c08a817b0e22622052c139ae5404659b44f1bd76bd27b509c56d9ce |