Commit 38fd6b12 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Split the virtualenv test to at least test what's working

parent c43ba87c
# expected: fail
# - misc issues
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
. test_env/bin/activate
set -ux
python -c 'import __future__'
python -c 'import sys; print sys.executable'
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])
# expected: fail
# - jit issue
import os import os
import sys import sys
import subprocess import subprocess
...@@ -17,17 +14,3 @@ if os.path.exists("test_env"): ...@@ -17,17 +14,3 @@ if os.path.exists("test_env"):
args = [sys.executable, VIRTUALENV_SCRIPT, "-p", sys.executable, "test_env"] args = [sys.executable, VIRTUALENV_SCRIPT, "-p", sys.executable, "test_env"]
print "Running", args print "Running", args
subprocess.check_call(args) subprocess.check_call(args)
sh_script = """
set -e
. test_env/bin/activate
set -ux
python -c 'import __future__'
python -c 'import sys; print sys.executable'
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