Skip to content

turn on --user tests for pypy #1692

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 30, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions tests/functional/test_install_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

from os.path import curdir, isdir, isfile

import pytest

from pip.backwardcompat import uses_pycache

from tests.lib.local_repos import local_checkout
Expand All @@ -35,8 +33,6 @@ def dist_in_site_packages(dist):
os.remove(cache_path)


# --user option is broken in pypy
@pytest.mark.skipif("hasattr(sys, 'pypy_version_info')")
class Tests_UserSite:

def test_reset_env_system_site_packages_usersite(self, script, virtualenv):
Expand Down
2 changes: 0 additions & 2 deletions tests/functional/test_install_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,6 @@ def test_install_from_wheel_no_deps(script, data):
assert pkg_folder not in result.files_created


# --user option is broken in pypy
@pytest.mark.skipif("hasattr(sys, 'pypy_version_info')")
def test_install_user_wheel(script, virtualenv, data):
"""
Test user install from wheel (that has a script)
Expand Down
4 changes: 0 additions & 4 deletions tests/functional/test_uninstall_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,10 @@
"""
from os.path import isdir, isfile

import pytest

from tests.lib import pyversion, assert_all_changes
from tests.functional.test_install_user import _patch_dist_in_site_packages


# --user option is broken in pypy
@pytest.mark.skipif("hasattr(sys, 'pypy_version_info')")
class Tests_UninstallUserSite:

def test_uninstall_from_usersite(self, script, virtualenv):
Expand Down
3 changes: 3 additions & 0 deletions tests/lib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@ def __init__(self, base_path, *args, **kwargs):
# Store paths related to the virtual environment
_virtualenv = kwargs.pop("virtualenv")
venv, lib, include, bin = virtualenv.path_locations(_virtualenv)
# workaround for https://github.com/pypa/virtualenv/issues/306
if hasattr(sys, "pypy_version_info"):
lib = os.path.join(venv, 'lib-python', pyversion)
self.venv_path = venv
self.lib_path = lib
self.include_path = include
Expand Down
4 changes: 4 additions & 0 deletions tests/lib/venv.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import absolute_import

import os
import sys
import subprocess

import virtualenv as _virtualenv
Expand All @@ -27,6 +28,9 @@ def __init__(self, location, *args, **kwargs):
self._system_site_packages = kwargs.pop("system_site_packages", False)

home, lib, inc, bin = _virtualenv.path_locations(self.location)
# workaround for https://github.com/pypa/virtualenv/issues/306
if hasattr(sys, "pypy_version_info"):
lib = os.path.join(home, 'lib-python', sys.version[:3])
self.lib = Path(lib)
self.bin = Path(bin)

Expand Down