# Path: segno/cli.py
# _EXT_TO_KW_MAPPING = {}
# def _get_args(func):
# def make_parser():
#     def _convert_scale(val):
# def parse(args):
# def build_config(config, filename=None):
# def make_code(config):
# def main(args=sys.argv[1:]):
#     def __init__(self, *args, **kwargs):
# class _AttrDict(dict):


from segno import cli
import pytest
# -*- coding: utf-8 -*-
#
# Copyright (c) 2016 - 2022 -- Lars Heuer
# All rights reserved.
#
# License: BSD License
#
"""\
Tests against issue #45.
<https://github.com/heuer/segno/issues/45>
"""
from __future__ import unicode_literals, absolute_import


def test_issue_45_error(capsys):
    try:
        cli.main(['--version=M1', '--seq', '"This is a test"'])
    except SystemExit as ex:
        assert 1 == ex.code
        assert capsys.readouterr()


def test_issue_45_no_error():

# Path: segno/cli.py
# _EXT_TO_KW_MAPPING = {}
# def _get_args(func):
# def make_parser():
#     def _convert_scale(val):
# def parse(args):
# def build_config(config, filename=None):
# def make_code(config):
# def main(args=sys.argv[1:]):
#     def __init__(self, *args, **kwargs):
# class _AttrDict(dict):


# Path: tests/test_issue45_cli_returncodes.py
from segno import cli
import pytest

# -*- coding: utf-8 -*-
#
# Copyright (c) 2016 - 2022 -- Lars Heuer
# All rights reserved.
#
# License: BSD License
#
"""\
Tests against issue #45.
<https://github.com/heuer/segno/issues/45>
"""
from __future__ import unicode_literals, absolute_import


def test_issue_45_error(capsys):
    try:
        cli.main(['--version=M1', '--seq', '"This is a test"'])
    except SystemExit as ex:
        assert 1 == ex.code
        assert capsys.readouterr()


def test_issue_45_no_error():

    assert 0 == cli.main(['--version=1', '--seq',