Describe-style plugin for pytest
Project description
Describe-style plugin for py.test
pytest-describe is a plugin for py.test that allows tests to be written in arbitrary nested describe-blocks, similar to RSpec (Ruby) and Jasmine (JavaScript).
The main inspiration for this was a video by Gary Bernhardt.
Example
def describe_list():
@pytest.fixture
def list():
return []
def describe_append():
def adds_to_end_of_list(list):
list.append('foo')
list.append('bar')
assert list == ['foo', 'bar']
def describe_remove():
@pytest.fixture
def list():
return ['foo', 'bar']
def removes_item_from_list(list):
list.remove('foo')
assert list == ['bar']
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-describe-0.6.tar.gz
(4.4 kB
view hashes)