I'm trying to check for a string in the feature file and am trying to get that string using {variable:w} . But this just raises an unimplemented error.
I've tried all the data types listed in the documentation , only a few of them seem to work. I also tried {} but it returns the whole sentence.
Feature: New Feature
Scenario:Test
Given I make a call
Then I expect "Hello"
@given("I make a call")
def make_call(step):
step.context.actual_result = "Hello"
@then("I expect {result:w}")
def expect_result(step,result):
print(type(result))
assert step.context.actual_result == result
I get this error
@step(r"Then I expect "Hello"")
def my_step(step):
raise NotImplementedError("This step is not implemented yet")
But it should assert the two strings and pass the test
Aucun commentaire:
Enregistrer un commentaire