def test_deployment_from_options_with_verbose(): options, _ = get_default_parser().parse_args([ '--verbose' ]) d = Deployment.from_options('foo', options) eq_(d.package, 'foo') eq_(d.verbose, True)
def test_deployment_from_options(): options, _ = get_default_parser().parse_args( ["--extra-index-url", "http://example.com", "-O--pypi-url", "http://example.org"] ) d = Deployment.from_options("foo", options) eq_(d.package, "foo") eq_(d.pypi_url, "http://example.org") eq_(d.extra_urls, ["http://example.com"])
def test_deployment_from_options(): options, _ = get_default_parser().parse_args([ '--extra-index-url', 'http://example.com', '-O--pypi-url', 'http://example.org' ]) d = Deployment.from_options('foo', options) eq_(d.package, 'foo') eq_(d.pypi_url, 'http://example.org') eq_(d.extra_urls, ['http://example.com'])
def test_deployment_from_options(): options, _ = get_default_parser().parse_args([ '--extra-index-url', 'http://example.com', '-O--pypi-url', 'http://example.org' ]) d = Deployment.from_options('foo', options) eq_(d.package, 'foo') eq_(d.pip_args, ['install', '--index-url=http://example.org', '--extra-index-url=http://example.com', LOG_ARG])
def test_deployment_from_options(): options, _ = get_default_parser().parse_args([ '--extra-index-url', 'http://example.com', '-O--pypi-url', 'http://example.org' ]) d = Deployment.from_options('foo', options) eq_(d.package, 'foo') eq_(d.pip_args, [ 'install', '--index-url=http://example.org', '--extra-index-url=http://example.com', LOG_ARG ])
def test_deployment_from_options_with_verbose_from_env(env_mock): env_mock.return_value = '1' options, _ = get_default_parser().parse_args([]) d = Deployment.from_options('foo', options) eq_(d.package, 'foo') eq_(d.verbose, True)
def test_deployment_from_options_with_verbose(): options, _ = get_default_parser().parse_args(['--verbose']) d = Deployment.from_options('foo', options) eq_(d.package, 'foo') eq_(d.verbose, True)
def test_deployment_from_options_with_verbose_from_env(env_mock): env_mock.return_value = '1' options, _ = get_default_parser().parse_args([]) d = Deployment.from_options('foo', options) eq_(d.package, 'foo') eq_(d.verbose, True)
def test_deployment_from_options_with_verbose(): options, _ = get_default_parser().parse_args(["--verbose"]) d = Deployment.from_options("foo", options) eq_(d.package, "foo") eq_(d.verbose, True)