Skip to content

Commit

Permalink
update readme and setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
netanelrevah committed Jul 28, 2019
1 parent 40ff097 commit 47aa9f5
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 4 deletions.
41 changes: 40 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,41 @@
# parametrization
# pytest-parametrization
Simpler PyTest parametrization

## How to use
### Explicit parameters
```python
from parametrization import Parametrization

@Parametrization.parameters("actual", "expected")
@Parametrization.case(name="some_case_0", actual=1, expected=2)
@Parametrization.case("some_case_1", actual=1, expected=2)
@Parametrization.case("some_case_2", 1, expected=1)
@Parametrization.case("some_case_3", 2, 2)
@Parametrization.case("some_case_4", 3, 3)
def test_somthing(actual, expected):
assert actual == expected
```
### Auto-detect parameters
```python
from parametrization import Parametrization

@Parametrization.autodetect_parameters()
@Parametrization.case(name="some_case_0", actual=1, expected=2)
@Parametrization.case("some_case_1", actual=1, expected=2)
@Parametrization.case("some_case_2", actual=1, expected=1)
def test_somthing(actual, expected):
assert actual == expected
```
### Auto-detect parameters with default parameter
```python
from parametrization import Parametrization

@Parametrization.autodetect_parameters()
@Parametrization.default_parameters(expected=None)
@Parametrization.case(name="some_case_0", actual=1, expected=2)
@Parametrization.case("some_case_1", actual=1, expected=2)
@Parametrization.case("some_case_2", actual=1, expected=1)
@Parametrization.case("some_case_2", actual=1)
def test_somthing(actual, expected):
assert actual == expected
```
9 changes: 6 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@

REQUIREMENTS = ['pytest', 'six']

README = open('./README.md').read()

setup(
name='pytest-parametrization',
version='2019.1.3',
version='2019.1.4',
py_modules=['parametrization'],
provides=['parametrization'],
description='Simpler PyTest parametrization',
author="Singular Labs",
author_email='contact@singular.net',
long_description=README,
author="Singular Labs, Inc",
author_email='devs@singular.net',
url='https://github.com/singular-labs/parametrization',
keywords="pytest, parametrize, parametrization, singular",
install_requires=REQUIREMENTS,
Expand Down

0 comments on commit 47aa9f5

Please sign in to comment.