예제 #1
0
def test_protocol_format_everything():
    """
    Just make sure the spacing between all the elements looks right.
    """
    p = Protocol()
    p.date = arrow.get(1988, 11, 8)
    p.commands = ['sw cmd-1', 'sw cmd-2']
    p.steps = ['Step 1', 'Step 2']
    p.footnotes = {1: 'Footnote 1', 2: 'Footnote 2'}
    assert p.format_text(inf) == """\
예제 #2
0
def test_protocol_format_date(date, expected):
    p = Protocol()
    p.date = arrow.get(date)
    assert p.format_text(inf) == expected.rstrip()