1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
"""
It is no longer recommended to do this:
import pytest_check
def test_old_style():
pytest_check.equal(1, 1)
or this:
import pytest_check as check
def test_old_style():
check.equal(1, 1)
However, it used to work.
It still works.
But this method is deprecated and may be removed in future versions.
Please migrate to this:
from pytest_check import check
def test_pass():
check.equal(1, 1)
"""
import pytest_check
from pytest_check import check
def test_old_style():
pytest_check.equal(1, 1)
def test_pass():
check.equal(1, 1)
with check:
assert 1 == 1
def test_pass_check(check):
check.equal(1, 1)
with check:
assert 1 == 1
|