Code: Select all
fixtures.py
Code: Select all
@pytest.fixture
def hello_world():
return "Hello world!"
< /code>
Und dann ... < /p>
basic_tests.py
Code: Select all
def test_says_hello(hello_world):
assert hello_world == "Hello world!"
Code: Select all
fixtures.py
Code: Select all
@pytest.fixture
def hello_world():
return "Hello world!"
< /code>
Und dann ... < /p>
basic_tests.py
Code: Select all
def test_says_hello(hello_world):
assert hello_world == "Hello world!"