# Path: venv_update.py
# DEFAULT_VIRTUALENV_PATH = 'venv'
# DEFAULT_OPTION_VALUES = {
#     'venv=': (DEFAULT_VIRTUALENV_PATH,),
#     'install=': ('-r', 'requirements.txt',),
#     'pip-command=': ('pip-faster', 'install', '--upgrade', '--prune'),
#     'bootstrap-deps=': ('venv-update==' + __version__,),
# }
# def parseargs(argv):
# def timid_relpath(arg):
# def shellescape(args):
# def colorize(cmd):
# def run(cmd):
# def info(msg):
# def check_output(cmd):
# def samefile(file1, file2):
# def exec_(argv):  # never returns
#     def __init__(self):
# def exec_scratch_virtualenv(args):
# def get_original_path(venv_path):  # TODO-TEST: a unit test
# def get_python_version(interpreter):
# def invalid_virtualenv_reason(venv_path, source_python, destination_python, virtualenv_system_site_packages):
# def ensure_virtualenv(args, return_values):
# def wait_for_all_subprocesses():
# def touch(filename, timestamp):
# def mark_venv_valid(venv_path):
# def mark_venv_invalid(venv_path):
# def dotpy(filename):
# def venv_executable(venv_path, executable):
# def venv_python(venv_path):
# def user_cache_dir():
# def venv_update(
#         venv=DEFAULT_OPTION_VALUES['venv='],
#         install=DEFAULT_OPTION_VALUES['install='],
#         pip_command=DEFAULT_OPTION_VALUES['pip-command='],
#         bootstrap_deps=DEFAULT_OPTION_VALUES['bootstrap-deps='],
# ):
# def execfile_(filename):
# def pip_faster(venv_path, pip_command, install, bootstrap_deps):
# def raise_on_failure(mainfunc, ignore_return=False):
# def main():
# class Scratch(object):
#     class return_values(object):
# 
# Path: venv_update.py
# DEFAULT_VIRTUALENV_PATH = 'venv'
# DEFAULT_OPTION_VALUES = {
#     'venv=': (DEFAULT_VIRTUALENV_PATH,),
#     'install=': ('-r', 'requirements.txt',),
#     'pip-command=': ('pip-faster', 'install', '--upgrade', '--prune'),
#     'bootstrap-deps=': ('venv-update==' + __version__,),
# }
# def parseargs(argv):
# def timid_relpath(arg):
# def shellescape(args):
# def colorize(cmd):
# def run(cmd):
# def info(msg):
# def check_output(cmd):
# def samefile(file1, file2):
# def exec_(argv):  # never returns
#     def __init__(self):
# def exec_scratch_virtualenv(args):
# def get_original_path(venv_path):  # TODO-TEST: a unit test
# def get_python_version(interpreter):
# def invalid_virtualenv_reason(venv_path, source_python, destination_python, virtualenv_system_site_packages):
# def ensure_virtualenv(args, return_values):
# def wait_for_all_subprocesses():
# def touch(filename, timestamp):
# def mark_venv_valid(venv_path):
# def mark_venv_invalid(venv_path):
# def dotpy(filename):
# def venv_executable(venv_path, executable):
# def venv_python(venv_path):
# def user_cache_dir():
# def venv_update(
#         venv=DEFAULT_OPTION_VALUES['venv='],
#         install=DEFAULT_OPTION_VALUES['install='],
#         pip_command=DEFAULT_OPTION_VALUES['pip-command='],
#         bootstrap_deps=DEFAULT_OPTION_VALUES['bootstrap-deps='],
# ):
# def execfile_(filename):
# def pip_faster(venv_path, pip_command, install, bootstrap_deps):
# def raise_on_failure(mainfunc, ignore_return=False):
# def main():
# class Scratch(object):
#     class return_values(object):


from testing import strip_coverage_warnings
from testing import venv_update
from venv_update import __doc__ as HELP_OUTPUT
from venv_update import __version__ as VERSION
    from subprocess import CalledProcessError
    import pytest
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals



def test_help():
    assert HELP_OUTPUT
    assert HELP_OUTPUT.startswith('usage:')
    last_line = HELP_OUTPUT.rsplit('\n', 2)[-2].strip()
    assert last_line.startswith('Please send issues to: https://')

    out, err = venv_update('--help')
    assert strip_coverage_warnings(err) == ''
    assert out == HELP_OUTPUT

    out, err = venv_update('-h')
    assert strip_coverage_warnings(err) == ''
    assert out == HELP_OUTPUT


def test_version():

# Path: venv_update.py
# DEFAULT_VIRTUALENV_PATH = 'venv'
# DEFAULT_OPTION_VALUES = {
#     'venv=': (DEFAULT_VIRTUALENV_PATH,),
#     'install=': ('-r', 'requirements.txt',),
#     'pip-command=': ('pip-faster', 'install', '--upgrade', '--prune'),
#     'bootstrap-deps=': ('venv-update==' + __version__,),
# }
# def parseargs(argv):
# def timid_relpath(arg):
# def shellescape(args):
# def colorize(cmd):
# def run(cmd):
# def info(msg):
# def check_output(cmd):
# def samefile(file1, file2):
# def exec_(argv):  # never returns
#     def __init__(self):
# def exec_scratch_virtualenv(args):
# def get_original_path(venv_path):  # TODO-TEST: a unit test
# def get_python_version(interpreter):
# def invalid_virtualenv_reason(venv_path, source_python, destination_python, virtualenv_system_site_packages):
# def ensure_virtualenv(args, return_values):
# def wait_for_all_subprocesses():
# def touch(filename, timestamp):
# def mark_venv_valid(venv_path):
# def mark_venv_invalid(venv_path):
# def dotpy(filename):
# def venv_executable(venv_path, executable):
# def venv_python(venv_path):
# def user_cache_dir():
# def venv_update(
#         venv=DEFAULT_OPTION_VALUES['venv='],
#         install=DEFAULT_OPTION_VALUES['install='],
#         pip_command=DEFAULT_OPTION_VALUES['pip-command='],
#         bootstrap_deps=DEFAULT_OPTION_VALUES['bootstrap-deps='],
# ):
# def execfile_(filename):
# def pip_faster(venv_path, pip_command, install, bootstrap_deps):
# def raise_on_failure(mainfunc, ignore_return=False):
# def main():
# class Scratch(object):
#     class return_values(object):
# 
# Path: venv_update.py
# DEFAULT_VIRTUALENV_PATH = 'venv'
# DEFAULT_OPTION_VALUES = {
#     'venv=': (DEFAULT_VIRTUALENV_PATH,),
#     'install=': ('-r', 'requirements.txt',),
#     'pip-command=': ('pip-faster', 'install', '--upgrade', '--prune'),
#     'bootstrap-deps=': ('venv-update==' + __version__,),
# }
# def parseargs(argv):
# def timid_relpath(arg):
# def shellescape(args):
# def colorize(cmd):
# def run(cmd):
# def info(msg):
# def check_output(cmd):
# def samefile(file1, file2):
# def exec_(argv):  # never returns
#     def __init__(self):
# def exec_scratch_virtualenv(args):
# def get_original_path(venv_path):  # TODO-TEST: a unit test
# def get_python_version(interpreter):
# def invalid_virtualenv_reason(venv_path, source_python, destination_python, virtualenv_system_site_packages):
# def ensure_virtualenv(args, return_values):
# def wait_for_all_subprocesses():
# def touch(filename, timestamp):
# def mark_venv_valid(venv_path):
# def mark_venv_invalid(venv_path):
# def dotpy(filename):
# def venv_executable(venv_path, executable):
# def venv_python(venv_path):
# def user_cache_dir():
# def venv_update(
#         venv=DEFAULT_OPTION_VALUES['venv='],
#         install=DEFAULT_OPTION_VALUES['install='],
#         pip_command=DEFAULT_OPTION_VALUES['pip-command='],
#         bootstrap_deps=DEFAULT_OPTION_VALUES['bootstrap-deps='],
# ):
# def execfile_(filename):
# def pip_faster(venv_path, pip_command, install, bootstrap_deps):
# def raise_on_failure(mainfunc, ignore_return=False):
# def main():
# class Scratch(object):
#     class return_values(object):


# Path: tests/functional/args.py
from testing import strip_coverage_warnings
from testing import venv_update
from venv_update import __doc__ as HELP_OUTPUT
from venv_update import __version__ as VERSION
    from subprocess import CalledProcessError
    import pytest

from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals



def test_help():
    assert HELP_OUTPUT
    assert HELP_OUTPUT.startswith('usage:')
    last_line = HELP_OUTPUT.rsplit('\n', 2)[-2].strip()
    assert last_line.startswith('Please send issues to: https://')

    out, err = venv_update('--help')
    assert strip_coverage_warnings(err) == ''
    assert out == HELP_OUTPUT

    out, err = venv_update('-h')
    assert strip_coverage_warnings(err) == ''
    assert out == HELP_OUTPUT


def test_version():

    assert VERSION