Commit db9e052a authored by Kevin Modzelewski's avatar Kevin Modzelewski

Add virtualenv submodule and simple virtualenv test

parent 4a9c756a
......@@ -7,3 +7,6 @@
[submodule "test/integration/django"]
path = test/integration/django
url = https://github.com/django/django
[submodule "test/integration/virtualenv"]
path = test/integration/virtualenv
url = https://github.com/dropbox/virtualenv
......@@ -4,9 +4,11 @@ opcode module - potentially shared between dis and other modules which
operate on bytecodes (e.g. peephole optimizers).
"""
# Pyston change: disable this module
raise NotImplementedError()
# Pyston change: disable this module.
# distutils does 'import opcode; foo(opcode.__file__)' to determine where the standard
# library lives, so still have to provide this file as an importable module.
"""
__all__ = ["cmp_op", "hasconst", "hasname", "hasjrel", "hasjabs",
"haslocal", "hascompare", "hasfree", "opname", "opmap",
"HAVE_ARGUMENT", "EXTENDED_ARG"]
......@@ -193,3 +195,4 @@ def_op('SET_ADD', 146)
def_op('MAP_ADD', 147)
del def_op, name_op, jrel_op, jabs_op
"""
Subproject commit ee62ccfda4950352bcad9612f0951fb38d805350
import os
import sys
import subprocess
import shutil
VIRTUALENV_SCRIPT = os.path.dirname(__file__) + "/virtualenv/virtualenv.py"
if os.path.exists("test_env"):
print "Removing the existing 'test_env/' directory"
subprocess.check_call(["rm", "-rf", "test_env"])
# shutil follows symlinks to directories, and deletes whatever those contain.
# shutil.rmtree("test_env")
args = [sys.executable, VIRTUALENV_SCRIPT, "-p", sys.executable, "test_env"]
print "Running", args
subprocess.check_call(args)
sh_script = """
set -e
python -c 'import __future__'
python -c 'import sys; print sys.executable'
. test_env/bin/activate
pip install bcrypt==1.1.0
python -c 'import bcrypt; assert bcrypt.__version__ == "1.1.0"; assert bcrypt.hashpw("password1", "$2a$12$0123456789012345678901").endswith("I1hdtg4K"); print "bcrypt seems to work"'
""".strip()
print sh_script
subprocess.check_call(["sh", "-c", sh_script])
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment