How to use the betelgeuse.parser function in Betelgeuse

To help you get started, we’ve selected a few Betelgeuse examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SatelliteQE / betelgeuse / tests / test_parser.py View on Github external
def test_parse_docstring():
    """Check ``parse_docstring`` parser result."""
    docstring = """
    :field1: value1
    :field2: value2
    :field3:
        * item 1
        * item 2
    """
    assert parser.parse_docstring(docstring) == {
        'field1': 'value1',
        'field2': 'value2',
        'field3': '<ul class="simple">\n<li><p>item 1</p></li>\n'
                  '<li><p>item 2</p></li>\n</ul>\n',
github SatelliteQE / betelgeuse / tests / test_parser.py View on Github external
'field1\n'
        '<p>value1</p>\n'
        '\n'
        '\n'
        'field2\n'
        '<p>value2</p>\n'
        '\n'
        '\n'
        'field3\n'
        '<p></p>\n'
        '\n'
        '\n'
        '\n'
        '\n'
    )
    assert parser.parse_rst(
        docstring, parser.TableFieldListTranslator) == expected
github SatelliteQE / betelgeuse / betelgeuse / default_config.py View on Github external
def _get_default_description(testcase):
    """Return the default value for description field."""
    return parser.parse_rst(testcase.docstring)