Skip to content

Commit 57dcec0

Browse files
committed
Merge pull request #619 from qwcode/issue_616
pypy test fixes for issue #616 and #617
2 parents 0fcfe0f + 483adaa commit 57dcec0

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

tests/test_pip.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,9 @@ def __init__(self, environ=None, use_distribute=None, sitecustomize=None):
314314
assert self.venv_path == virtualenv_paths[0] # sanity check
315315

316316
for id, path in zip(('venv', 'lib', 'include', 'bin'), virtualenv_paths):
317+
#fix for virtualenv issue #306
318+
if hasattr(sys, "pypy_version_info") and id == 'lib':
319+
path = os.path.join(self.venv_path, 'lib-python', pyversion)
317320
setattr(self, id+'_path', Path(path))
318321
setattr(self, id, relpath(self.root_path, path))
319322

@@ -444,6 +447,9 @@ def __init__(self, environ=None, sitecustomize=None):
444447
virtualenv_paths = virtualenv.path_locations(self.venv_path)
445448

446449
for id, path in zip(('venv', 'lib', 'include', 'bin'), virtualenv_paths):
450+
#fix for virtualenv issue #306
451+
if hasattr(sys, "pypy_version_info") and id == 'lib':
452+
path = os.path.join(self.venv_path, 'lib-python', pyversion)
447453
setattr(self, id+'_path', Path(path))
448454
setattr(self, id, relpath(self.root_path, path))
449455

tests/test_user_site.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ def setup(self):
3535
# --user only works on 2.6 or higher
3636
if sys.version_info < (2, 6):
3737
raise SkipTest()
38+
# --user option is broken in pypy
39+
if hasattr(sys, "pypy_version_info"):
40+
raise SkipTest()
41+
3842

3943
def test_reset_env_system_site_packages_usersite(self):
4044
"""
@@ -66,9 +70,6 @@ def test_install_subversion_usersite_editable_with_distribute(self):
6670
"""
6771
Test installing current directory ('.') into usersite after installing distribute
6872
"""
69-
# FIXME distutils --user option seems to be broken in pypy
70-
if hasattr(sys, "pypy_version_info"):
71-
raise SkipTest()
7273
env = reset_env(use_distribute=True, system_site_packages=True)
7374
result = run_pip('install', '--user', '-e',
7475
'%s#egg=initools-dev' %
@@ -80,9 +81,6 @@ def test_install_curdir_usersite(self):
8081
"""
8182
Test installing current directory ('.') into usersite
8283
"""
83-
# FIXME distutils --user option seems to be broken in pypy
84-
if hasattr(sys, "pypy_version_info"):
85-
raise SkipTest()
8684
env = reset_env(use_distribute=True, system_site_packages=True)
8785
run_from = abspath(join(here, 'packages', 'FSPkg'))
8886
result = run_pip('install', '--user', curdir, cwd=run_from, expect_error=False)

0 commit comments

Comments
 (0)