Did I find the right examples for you? yes no

All Samples(25)  |  Call(25)  |  Derive(0)  |  Import(0)

src/l/e/lettuce-HEAD/tests/unit/test_step_parsing.py   lettuce(Download)
def test_step_has_repr():
    "Step implements __repr__ nicely"
    step = Step.from_string(I_HAVE_TASTY_BEVERAGES)
    assert_equals(
        repr(step),
def test_can_get_sentence_from_string():
    "It should extract the sentence string from the whole step"
 
    step = Step.from_string(I_HAVE_TASTY_BEVERAGES)
 
def test_can_parse_keys_from_table():
    "It should take the keys from the step, if it has a table"
 
    step = Step.from_string(I_HAVE_TASTY_BEVERAGES)
    assert_equals(step.keys, ('Name', 'Type', 'Price'))
 
def test_can_parse_tables():
    "It should have a list of data from a given step, if it has a table"
 
    step = Step.from_string(I_HAVE_TASTY_BEVERAGES)
def test_multiline_is_parsed():
    step = Step.from_string(MULTI_LINE)
    assert_equals(step.sentence, 'I have a string like so:')
    assert_equals(step.multiline, u"""This is line one
and this is line two

src/l/e/lettuce-HEAD/tests/unit/test_step_runner.py   lettuce(Download)
        step.given('I do something simple')
 
    runnable_step = Step.from_string('Given I do many complex things')
    runnable_step.run(True)
    assert(simple_thing_ran)
        step.then('I do something simple')
 
    runnable_step = Step.from_string('Then I do many complex things')
    runnable_step.run(True)
    assert(simple_thing_ran)
        step.when('I do something simple')
 
    runnable_step = Step.from_string('When I do many complex things')
    runnable_step.run(True)
    assert(simple_thing_ran)
        second_ran = True
 
    runnable_step = Step.from_string('Given I run two subordinate steps')
    runnable_step.run(True)
    assert_equals((first_ran, second_ran), (True, True))
def test_successful_behave_as_step_passes():
    'When a step definition calls another (successful) step definition with behave_as, that step should be a success.'
    runnable_step = Step.from_string('Given I have a step which calls the "define a step" step with behave_as')
    runnable_step.run(True)
    assert runnable_step.passed

src/l/e/lettuce-HEAD/tests/unit/test_core.py   lettuce(Download)
def test_step_represent_table():
    "Step.represent_hashes"
 
    step = core.Step.from_string(STEP_WITH_TABLE)
 
def test_step_represent_matrix():
    "Step with a more suggestive representation for a matrix"
 
    step = core.Step.from_string(STEP_WITH_MATRIX2)
    assert_equals(