@pytest.mark.mercurial
def test_freeze_mercurial_clone(script, tmpdir):
 pkg_version = _create_test_package(script, vcs='hg')
 result = script.run('hg', 'clone', pkg_version, 'pip-test-package', expect_stderr=True)
 repo_dir = (script.scratch_path / 'pip-test-package')
 result = script.run('python', 'setup.py', 'develop', cwd=repo_dir, expect_stderr=True)
 result = script.pip('freeze', expect_stderr=True)
 expected = textwrap.dedent('\n            ...-e hg+...#egg=version_pkg\n            ...\n        ').strip()
 _check_output(result.stdout, expected)
 result = script.pip('freeze', '-f', ('%s#egg=pip_test_package' % repo_dir), expect_stderr=True)
 expected = textwrap.dedent(('\n            -f %(repo)s#egg=pip_test_package...\n            ...-e hg+...#egg=version_pkg\n            ...\n        ' % {'repo': repo_dir})).strip()
 _check_output(result.stdout, expected)

@ pytest . mark . mercurial def test_freeze_mercurial_clone ( script , tmpdir ) : pkg_version = _create_test_package ( script , vcs = 'hg' ) result = script . run ( 'hg' , 'clone' , pkg_version , 'pip-test-package' , expect_stderr = True ) repo_dir = ( script . scratch_path / 'pip-test-package' ) result = script . run ( 'python' , 'setup.py' , 'develop' , cwd = repo_dir , expect_stderr = True ) result = script . pip ( 'freeze' , expect_stderr = True ) expected = textwrap . dedent ( '\n            ...-e hg+...#egg=version_pkg\n            ...\n        ' ) . strip ( ) _check_output ( result . stdout , expected ) result = script . pip ( 'freeze' , '-f' , ( '%s#egg=pip_test_package' % repo_dir ) , expect_stderr = True ) expected = textwrap . dedent ( ( '\n            -f %(repo)s#egg=pip_test_package...\n            ...-e hg+...#egg=version_pkg\n            ...\n        ' % { 'repo' : repo_dir } ) ) . strip ( ) _check_output ( result . stdout , expected )
test freezing a mercurial clone .