How to use the segno.cli.build_config function in segno

To help you get started, we’ve selected a few segno 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 heuer / segno / tests / test_cli.py View on Github external
def test_unit():
    args = cli.parse([''])
    assert args.unit is None
    assert cli.build_config(args)['unit'] is None
github heuer / segno / tests / test_cli.py View on Github external
def test_nl2():
    args = cli.parse(['--no-newline', '--output=x.svg', ''])
    assert not args.nl
    assert cli.build_config(args)['nl'] is False
github heuer / segno / tests / test_cli.py View on Github external
def test_omit_xmldecl():
    args = cli.parse(['--no-xmldecl', '--output=x.svg', ''])
    assert not args.xmldecl
    assert cli.build_config(args)['xmldecl'] is False
github heuer / segno / tests / test_cli.py View on Github external
def test_xmldecl():
    args = cli.parse(['--output=x.svg', ''])
    assert args.xmldecl
    assert cli.build_config(args)['xmldecl'] is True
github heuer / segno / tests / test_cli.py View on Github external
def test_ns2():
    args = cli.parse(['--no-namespace', '--output=x.svg', ''])
    assert not args.svgns
    assert cli.build_config(args)['svgns'] is False
github heuer / segno / tests / test_cli.py View on Github external
def test_svgversion():
    args = cli.parse([''])
    assert args.svgversion is None
    assert cli.build_config(args)['svgversion'] is None
github heuer / segno / tests / test_cli.py View on Github external
def test_encoding():
    args = cli.parse(['--output=x.svg', ''])
    assert args.encoding == 'utf-8'
    assert cli.build_config(args)['encoding'] == 'utf-8'
github heuer / segno / tests / test_cli.py View on Github external
def test_ns():
    args = cli.parse(['--output=x.svg', ''])
    assert args.svgns is True
    assert cli.build_config(args)['svgns'] is True
github heuer / segno / tests / test_cli.py View on Github external
def test_svgclass():
    args = cli.parse(['--output=x.svg', ''])
    assert args.svgclass is None
    assert 'svgclass' not in cli.build_config(args)
github heuer / segno / tests / test_cli.py View on Github external
def test_png_svg_command():
    args = cli.parse(['--svgversion=1.1', ''])
    assert args.svgversion == 1.1
    assert 'svgversion' in cli.build_config(args)
    assert 'svgversion' not in cli.build_config(args, filename='x.png')