Skip to main content

Dado: Data Driven Test Decorator.

Project description

# dado
Data-driven test decorator

# What
Decorate a test to create indepenent tests for each decorated data set.

# Example

Given:
```python
from dado import data_driven

@data_driven(['first', 'second'], {
'letters': ['a', 'b'],
'numbers': [0, 1],
})
def test_first_two(first, second): ...
```

When you load the module, it will load as if you'd defined:
```python
def test_first_two_letters():
return test_first_two('a', 'b')

def test_first_two_numbers():
return test_first_two(0, 1)
```

# Name
A 'dado' in woodworking is "a groove cut in the face of a board, into which the edge of another board is fixed."

This decorator lets you define a test function into which you fit test data to get the tests you actually want to run.

Plus, 'dado' is much easier to say and remember than 'data-driven-test-decorator', while still keeping some phonetic
similarity.

Naming credit goes to [soapko](https://github.com/soapko) :-)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

dado-0.1.0-py2.py3-none-any.whl (4.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file dado-0.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for dado-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ac9eb7c58efb7582cd4bc2401d4fb7da8b220cf750e5728e42b665e3cc60924c
MD5 fe61ac1b243b085c60477acd5e86fe53
BLAKE2b-256 922e452e83e9e7d223396e3de07f213b3939cac44fc2619c8f43c178ea34b9cb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page