summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2011-10-09 01:29:27 -0400
committerChris McDonough <chrism@plope.com>2011-10-09 01:29:27 -0400
commit3be1baf1e32b8b7eed4b683ccd3269a7bc8f063d (patch)
tree3359727b011d7ca111af35880c5dadd00f366866
parentdfc1274dd488ddd1e6e937b9bb2142d7fac78e30 (diff)
downloadpyramid-3be1baf1e32b8b7eed4b683ccd3269a7bc8f063d.tar.gz
pyramid-3be1baf1e32b8b7eed4b683ccd3269a7bc8f063d.tar.bz2
pyramid-3be1baf1e32b8b7eed4b683ccd3269a7bc8f063d.zip
deal better with py3
-rw-r--r--pyramid/scaffolds/tests.py14
1 files changed, 4 insertions, 10 deletions
diff --git a/pyramid/scaffolds/tests.py b/pyramid/scaffolds/tests.py
index 3c276a473..132177187 100644
--- a/pyramid/scaffolds/tests.py
+++ b/pyramid/scaffolds/tests.py
@@ -12,6 +12,8 @@ try:
except ImportError: # pragma: no cover
import http.client as httplib
+from pyramid.compat import PY3
+
class TemplateTest(object):
def make_venv(self, directory): # pragma: no cover
import virtualenv
@@ -23,7 +25,7 @@ class TemplateTest(object):
site_packages=False,
clear=False,
unzip_setuptools=True,
- use_distribute=False)
+ use_distribute=PY3)
def install(self, tmpl_name): # pragma: no cover
try:
self.old_cwd = os.getcwd()
@@ -56,7 +58,7 @@ class TemplateTest(object):
resp = conn.getresponse()
assert resp.status == 200, ininame
data = resp.read()
- toolbarchunk = '<div id="pDebug"'
+ toolbarchunk = b'<div id="pDebug"'
if hastoolbar:
assert toolbarchunk in data, ininame
else:
@@ -73,14 +75,6 @@ class TemplateTest(object):
os.chdir(self.old_cwd)
if __name__ == '__main__': # pragma: no cover
- if not hasattr(subprocess, 'check_call'):
- # 2.4
- def check_call(*arg, **kw):
- returncode = subprocess.call(*arg, **kw)
- if returncode:
- raise ValueError(returncode)
- subprocess.check_call = check_call
-
templates = ['starter', 'alchemy', 'routesalchemy',]
if sys.version_info >= (2, 5) and sys.version_info < (3, 0):