22# https://github.com/behave/behave.example
33# License: BSD
44
5- # pylint: disable=E0401,E0602,E0611,C0114,C0116,E0102,W0613,W0614,W0401
5+ # pylint: disable=E0401,E0602,E0611,E1102, C0114,C0116,E0102,W0613,W0614,W0401
66
77from behave import *
88
@@ -15,7 +15,7 @@ def step_the_ninja_encounters_another_opponent(context):
1515 # -- SETUP/TEARDOWN:
1616 if hasattr (context , "ninja_fight" ):
1717 # -- VERIFY: Double-call does not occur.
18- assert context .ninja_fight is not None
18+ assert context .ninja_fight is not None , "Value for context.ninja_fight should not be None"
1919 context .ninja_fight = None
2020
2121@given ('the ninja has a {achievement_level}' )
@@ -34,7 +34,7 @@ def step_attacked_by(context, opponent):
3434def step_the_ninja_should (context , reaction ):
3535 actual_reaction = context .ninja_fight .decision ()
3636 print (f"Reaction: { actual_reaction } " )
37- assert reaction == actual_reaction
37+ assert reaction == actual_reaction , f"Unexpected reaction: { actual_reaction } "
3838
3939
4040# file:features/steps/ninja_fight.py
@@ -54,8 +54,8 @@ def decision(self):
5454 """
5555 Business logic how a Ninja should react to increase his survival rate.
5656 """
57- assert self .with_ninja_level is not None
58- assert self .opponent is not None
57+ assert self .with_ninja_level is not None , "Value for self.with_ninja_level should not be None"
58+ assert self .opponent is not None , "Value for self.opponent should not be None"
5959 if self .opponent == "Chuck Norris" :
6060 return "run for his life"
6161 if "black-belt" in self .with_ninja_level :
0 commit comments