Did I find the right examples for you? yes no

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

src/l/e/lettuce-HEAD/tests/unit/test_step_parsing.py   lettuce(Download)
def test_can_parse_a_unary_array_from_single_step():
    "It should extract a single ordinary step correctly into an array of steps"
 
    steps = Step.many_from_lines(I_HAVE_TASTY_BEVERAGES.splitlines())
    assert_equals(len(steps), 1)
def test_can_parse_a_unary_array_from_complicated_step():
    "It should extract a single tabular step correctly into an array of steps"
    steps = Step.many_from_lines(I_LIKE_VEGETABLES.splitlines())
    assert_equals(len(steps), 1)
    assert isinstance(steps[0], Step)
    assert_equals(steps[0].sentence, I_LIKE_VEGETABLES)
 
def test_can_parse_regular_step_followed_by_tabular_step():
    "It should correctly extract two steps (one regular, one tabular) into an array."
    steps = Step.many_from_lines(I_LIKE_VEGETABLES.splitlines() +  I_HAVE_TASTY_BEVERAGES.splitlines())
def test_can_parse_tabular_step_followed_by_regular_step():
    "It should correctly extract two steps (one tabular, one regular) into an array."
    steps = Step.many_from_lines(I_HAVE_TASTY_BEVERAGES.splitlines() + I_LIKE_VEGETABLES.splitlines())
    assert_equals(len(steps), 2)
    assert isinstance(steps[0], Step)
def test_can_parse_two_ordinary_steps():
    "It should correctly extract two ordinary steps into an array."
    steps = Step.many_from_lines(I_DIE_HAPPY.splitlines() + I_LIKE_VEGETABLES.splitlines())
    assert_equals(len(steps), 2)
    assert isinstance(steps[0], Step)