Sample Pytest

import pytest
@pytest.fixture()
def before_meth(scope='module'):
print('before_meth Setup')
yield
print('teardown')
def inc(x):
return x + 1


def test_answer(before_meth):
assert inc(3) == 4

One comment

Leave a Reply