Skip to content

Commit

Permalink
Add test case using pytest fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipMay committed Jan 2, 2024
1 parent 0205767 commit 9917d75
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions source/python/pytest.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

## Fixtures

```python
import pytest

@pytest.fixture
def my_value():
return 5

def test_my_fruit_in_basket(my_value):
result = my_value + 5
assert result == 10
```

- also see <https://docs.pytest.org/en/6.2.x/fixture.html#back-to-fixtures>

## Parametrize

## Skip Tests
Expand Down

0 comments on commit 9917d75

Please sign in to comment.