diff options
author | agronholm <devnull@localhost> | 2009-12-20 15:09:32 +0200 |
---|---|---|
committer | agronholm <devnull@localhost> | 2009-12-20 15:09:32 +0200 |
commit | 2680e2c4544d35b9faa3137b9e91c8c7fa970084 (patch) | |
tree | b7523e2e7a9f04c31e311ed980ab02126ab817f4 /tests | |
parent | 2fd3d27b534ef3a98c0727102465feb88dd741e2 (diff) | |
download | python-setuptools-bitbucket-2680e2c4544d35b9faa3137b9e91c8c7fa970084.tar.gz |
Modified test script to be py3k compatible
Diffstat (limited to 'tests')
-rw-r--r-- | tests/manual_test.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/manual_test.py b/tests/manual_test.py index ad6b2b9b..ce8d10f2 100644 --- a/tests/manual_test.py +++ b/tests/manual_test.py @@ -2,10 +2,14 @@ import os import shutil import tempfile -import urllib2 import subprocess import sys +if sys.version_info[0] < 3: + from urllib2 import urlopen +else: + from urllib.request import urlopen + def tempdir(func): def _tempdir(*args, **kwargs): test_dir = tempfile.mkdtemp() @@ -61,7 +65,7 @@ def test_full(): f.write(SIMPLE_BUILDOUT) with open('bootstrap.py', 'w') as f: - f.write(urllib2.urlopen(BOOTSTRAP).read()) + f.write(urlopen(BOOTSTRAP).read()) os.system('bin/python bootstrap.py --distribute') os.system('bin/buildout -q') |