# Path: shipwright/_lib/cli.py
# def argparser():
#     def a_arg(parser, *args, **kwargs):
# def parse_registry_logins(registry_logins):
# def _flatten(items):
# def old_style_arg_dict(namespace):
# def main():
# def process_arguments(path, arguments, client_cfg, environ):
#     def default(self, obj):
# def run(path, arguments, client_cfg, environ, new_style_args=None):
# def exit(msg):
# def memo(f, arg, memos={}):
# def pretty_event(evt, show_progress):
# def highlight(name):
#     def highlight_(msg):
# def switch(rec, show_progress):
# class SetJSONEncoder(json.JSONEncoder):


import git
import pytest
from docker import tls
from shipwright._lib import cli
    return {
        '--account': None,
        '--dependents': [],
        '--dump-file': None,
        '--exact': [],
        '--exclude': [],
        '--help': False,
        '--no-build': False,
        '--upto': [],
        '--x-assert-hostname': False,
        '-H': None,
        'TARGET': [],
        'build': False,
        'push': False,
        'images': False,
        'tags': ['latest'],
    }


def create_repo(path):
    repo = git.Repo.init(path)
    repo.index.add(repo.untracked_files)
    repo.index.commit('Initial Commit')
    return repo


def test_without_json_manifest(tmpdir):
    path = str(tmpdir.join('no-manifest'))
    create_repo(path)
    with pytest.raises(SystemExit):

# Path: shipwright/_lib/cli.py
# def argparser():
#     def a_arg(parser, *args, **kwargs):
# def parse_registry_logins(registry_logins):
# def _flatten(items):
# def old_style_arg_dict(namespace):
# def main():
# def process_arguments(path, arguments, client_cfg, environ):
#     def default(self, obj):
# def run(path, arguments, client_cfg, environ, new_style_args=None):
# def exit(msg):
# def memo(f, arg, memos={}):
# def pretty_event(evt, show_progress):
# def highlight(name):
#     def highlight_(msg):
# def switch(rec, show_progress):
# class SetJSONEncoder(json.JSONEncoder):


# Path: tests/test_cli.py
import git
import pytest
from docker import tls
from shipwright._lib import cli

    return {
        '--account': None,
        '--dependents': [],
        '--dump-file': None,
        '--exact': [],
        '--exclude': [],
        '--help': False,
        '--no-build': False,
        '--upto': [],
        '--x-assert-hostname': False,
        '-H': None,
        'TARGET': [],
        'build': False,
        'push': False,
        'images': False,
        'tags': ['latest'],
    }


def create_repo(path):
    repo = git.Repo.init(path)
    repo.index.add(repo.untracked_files)
    repo.index.commit('Initial Commit')
    return repo


def test_without_json_manifest(tmpdir):
    path = str(tmpdir.join('no-manifest'))
    create_repo(path)
    with pytest.raises(SystemExit):

        cli.process_arguments(