aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual_test.py
diff options
context:
space:
mode:
authoragronholm <none@none>2009-12-20 15:09:32 +0200
committeragronholm <none@none>2009-12-20 15:09:32 +0200
commite197e57da318f00d84b559ccfa16fd0d1581441d (patch)
treea608c145f093b2f6e83cc9829b9179afd986453a /tests/manual_test.py
parent4dae8e432648fc0d4dcfcaa117b4e60031504596 (diff)
downloadexternal_python_setuptools-e197e57da318f00d84b559ccfa16fd0d1581441d.tar.gz
external_python_setuptools-e197e57da318f00d84b559ccfa16fd0d1581441d.tar.bz2
external_python_setuptools-e197e57da318f00d84b559ccfa16fd0d1581441d.zip
Modified test script to be py3k compatible
--HG-- branch : distribute extra : rebase_source : d29c168646125155f3664cec0b88686ac14fbb22
Diffstat (limited to 'tests/manual_test.py')
-rw-r--r--tests/manual_test.py8
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')