Вот мой шаг:
Код: Выделить всё
Given the current account balance is "zero"
Код: Выделить всё
@given("the current account balance is {arg}")
def current_account_initial_balance(amount):
print(amount)
Код: Выделить всё
============================================================= test session starts ==============================================================
platform win32 -- Python 3.11.5, pytest-8.3.3, pluggy-1.5.0rootdir: C:\pythonplugins: bdd-8.0.0
collected 1 item
TestBankTransactions.py F
=========================================================== short test summary info ============================================================
FAILED TestBankTransactions.py::test_deposit_into_account - pytest_bdd.exceptions.StepDefinitionNotFoundError: Step definition is not found: Given "the current account balance is "zero"". Line 6 in sc...
============================================================== 1 failed in 0.02s ===============================================================
Подробнее здесь: https://stackoverflow.com/questions/791 ... n-bdd-test
Мобильная версия