Esempio n. 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) == """\
Esempio n. 2
0
def test_protocol_format_commands(commands, expected):
    p = Protocol()
    p.commands = commands
    assert p.format_text(inf) == expected.rstrip()