E
Size: a a a
E
DB
search
уникальная фишка (хоть я и не понимаю зачем она нужна 🌝)E
Б
@fixture
def user():
return User(name="darren")
@test("the user is called darren")
def _(u=user):
assert u.name == "darren"
Б
u
AK
AK
@test("the user is called darren")
def _(u
ser=user
_without_permissions):
assert u
ser.name == "darren"
AK
Б
Function 'user_without_permissions' does not have an attribute 'name'
DB
E
@test("eval returns expected output")
def _(
test_input=each("3+5", "2+4", "6*9"),
expected=each(8, 6, 42),
):
assert eval(test_input) == expected
DB
E
Б
Б
Б
Б
@pytest.mark.parametrize('foo', (1, 2, 3))
@pytest.mark.parametrize('bar', (9, 8, 7))
def test_something(foo, bar):
pass
@each
def test_something(foo=each(1, 2, 3), bar=each(9, 8, 7)):
pass
AN
Б