コード例 #1
0
ファイル: tests.py プロジェクト: omaciel/betelgeuse
def test_get_multiple_steps_diff_items():
    multiple_steps = '\n'.join(MULTIPLE_STEPS.splitlines()[:-1])
    assert map_steps(
        multiple_steps, MULTIPLE_EXPECTEDRESULTS) == [(
            RST_PARSER.parse(multiple_steps),
            RST_PARSER.parse(MULTIPLE_EXPECTEDRESULTS),
        )]
コード例 #2
0
ファイル: tests.py プロジェクト: kbidarkar/betelgeuse
def test_get_multiple_steps_diff_items():
    """Check if parsing multiple steps of different items works."""
    multiple_steps = '\n'.join(MULTIPLE_STEPS.splitlines()[:-1])
    assert map_steps(multiple_steps, MULTIPLE_EXPECTEDRESULTS) == [(
        RST_PARSER.parse(multiple_steps),
        RST_PARSER.parse(MULTIPLE_EXPECTEDRESULTS),
    )]
コード例 #3
0
ファイル: tests.py プロジェクト: kbidarkar/betelgeuse
def test_map_steps_parse_error():
    """Check if mapping multiple steps with a parse error works."""
    multiple_steps = MULTIPLE_STEPS.replace('. ', '.', 1)
    assert map_steps(multiple_steps, MULTIPLE_EXPECTEDRESULTS) == [(
        RST_PARSER.parse(multiple_steps),
        RST_PARSER.parse(MULTIPLE_EXPECTEDRESULTS),
    )]
コード例 #4
0
ファイル: tests.py プロジェクト: mrniranjan/betelgeuse
def test_map_steps_parse_error():
    """Check if mapping multiple steps with a parse error works."""
    multiple_steps = MULTIPLE_STEPS.replace('. ', '.', 1)
    assert map_steps(multiple_steps, MULTIPLE_EXPECTEDRESULTS) == [(
        RST_PARSER.parse(multiple_steps),
        RST_PARSER.parse(MULTIPLE_EXPECTEDRESULTS),
    )]
コード例 #5
0
ファイル: tests.py プロジェクト: mrniranjan/betelgeuse
def test_get_multiple_steps_diff_items():
    """Check if parsing multiple steps of different items works."""
    multiple_steps = '\n'.join(MULTIPLE_STEPS.splitlines()[:-1])
    assert map_steps(
        multiple_steps, MULTIPLE_EXPECTEDRESULTS) == [(
            RST_PARSER.parse(multiple_steps),
            RST_PARSER.parse(MULTIPLE_EXPECTEDRESULTS),
        )]
コード例 #6
0
ファイル: tests.py プロジェクト: elyezer/betelgeuse
def test_rst_parser():
    """Check if rst parsing works."""
    docstring = """Line one"""
    generated_html = "<p>Line one</p>\n"
    assert RST_PARSER.parse(docstring) == generated_html
コード例 #7
0
ファイル: tests.py プロジェクト: omaciel/betelgeuse
def test_rst_parser():
    docstring = """Line one"""
    generated_html = "<p>Line one</p>\n"
    assert RST_PARSER.parse(docstring) == generated_html
コード例 #8
0
ファイル: tests.py プロジェクト: omaciel/betelgeuse
def test_map_steps_parse_error():
    multiple_steps = MULTIPLE_STEPS.replace('. ', '.', 1)
    assert map_steps(multiple_steps, MULTIPLE_EXPECTEDRESULTS) == [(
        RST_PARSER.parse(multiple_steps),
        RST_PARSER.parse(MULTIPLE_EXPECTEDRESULTS),
    )]
コード例 #9
0
ファイル: tests.py プロジェクト: kbidarkar/betelgeuse
def test_rst_parser():
    """Check if rst parsing works."""
    docstring = """Line one"""
    generated_html = "<p>Line one</p>\n"
    assert RST_PARSER.parse(docstring) == generated_html