github.com/sercand/please@v13.4.0+incompatible/test/python_rules/behave/features/steps/behave_test_steps.py (about)

     1  from behave import given, when, then, step
     2  
     3  
     4  @given('we have behave installed')
     5  def step_impl(context):
     6      pass
     7  
     8  
     9  @given('we should see our custom flags in context')
    10  def step_impl(context):
    11      assert context.config.userdata['test_value'] == 'this value should show up in my context'
    12  
    13  
    14  @when('we implement {number:d} tests')
    15  def step_impl(context, number):
    16      assert number > 1 or number == 0
    17      context.tests_count = number
    18  
    19  
    20  @then('behave will test them for us!')
    21  def step_impl(context):
    22      assert context.failed is False
    23      assert context.tests_count >= 0