@pytest.mark.network
def test_git_with_tag_name_and_update(script, tmpdir):
 result = script.pip('install', '-e', ('%s#egg=pip-test-package' % local_checkout('git+http://github.com/pypa/pip-test-package.git', tmpdir.join('cache'))), expect_error=True)
 result.assert_installed('pip-test-package', with_files=['.git'])
 result = script.pip('install', '--global-option=--version', '-e', ('%s@0.1.2#egg=pip-test-package' % local_checkout('git+http://github.com/pypa/pip-test-package.git', tmpdir.join('cache'))), expect_error=True)
 assert ('0.1.2' in result.stdout)

@ pytest . mark . network def test_git_with_tag_name_and_update ( script , tmpdir ) : result = script . pip ( 'install' , '-e' , ( '%s#egg=pip-test-package' % local_checkout ( 'git+http://github.com/pypa/pip-test-package.git' , tmpdir . join ( 'cache' ) ) ) , expect_error = True ) result . assert_installed ( 'pip-test-package' , with_files = [ '.git' ] ) result = script . pip ( 'install' , '--global-option=--version' , '-e' , ( '%s@0.1.2#egg=pip-test-package' % local_checkout ( 'git+http://github.com/pypa/pip-test-package.git' , tmpdir . join ( 'cache' ) ) ) , expect_error = True ) assert ( '0.1.2' in result . stdout )
test cloning a git repository and updating to a different version .