def test_parse_title(): parser = Parser([(1, gherkin.TOKEN_TEXT, "Scenario title"), (1, gherkin.TOKEN_NEWLINE, "\n")]) feature = parser.parse_title() feature.should.equal(Ast.Text(line=1, text="Scenario title"))
def test_parse_empty_title(): parser = Parser([(1, gherkin.TOKEN_NEWLINE, "\n"), (2, gherkin.TOKEN_TEXT, "more text after title")]) feature = parser.parse_title() feature.should.be.none
def test_parse_title(): parser = Parser([ (1, gherkin.TOKEN_TEXT, 'Scenario title'), (1, gherkin.TOKEN_NEWLINE, '\n'), ]) feature = parser.parse_title() feature.should.equal(Ast.Text(line=1, text='Scenario title'))
def test_parse_empty_title(): parser = Parser([ (1, gherkin.TOKEN_NEWLINE, '\n'), (2, gherkin.TOKEN_TEXT, 'more text after title'), ]) feature = parser.parse_title() feature.should.be.none