示例#1
0
def test_section_to_yaml_returns_correct_yaml_when_tools_present():
    tools = {
        'advpng': '/bin/advpng',
        'optipng': '/bin/optipng',
    }
    expected = """\
commands:
  advpng: /bin/advpng
  optipng: /bin/optipng
"""
    output = helpers.section_to_yaml('commands', tools)
    assert output == expected
示例#2
0
def test_section_to_yaml_returns_correct_yaml_when_tools_present():
    tools = {
        'advpng': '/bin/advpng',
        'optipng': '/bin/optipng',
    }
    expected = """\
commands:
  advpng: /bin/advpng
  optipng: /bin/optipng
"""
    output = helpers.section_to_yaml('commands', tools)
    assert output == expected
示例#3
0
def test_section_to_yaml_returns_empty_string_when_given_no_commands():
    output = helpers.section_to_yaml('commands', {})
    assert output == ""
示例#4
0
def test_section_to_yaml_returns_empty_string_when_given_no_commands():
    output = helpers.section_to_yaml('commands', {})
    assert output == ""