From 109b2a0b29e0d63a521a91021c736851248ac7d3 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 13 Apr 2015 10:43:21 -0400 Subject: make it possible to run scaffold functests using tox --- CHANGES.txt | 3 +++ HACKING.txt | 7 +++++++ RELEASING.txt | 5 ++++- pyramid/tests/test_request.py | 1 - tox.ini | 27 ++++++++++++++++++++++++++- 5 files changed, 40 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 850098de1..471683d25 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -230,6 +230,9 @@ Scaffolds - Removed non-ascii copyright symbol from templates, as this was causing the scaffolds to fail for project generation. +- You can now run the scaffolding func tests via ``tox py2-scaffolds`` and + ``tox py3-scaffolds``. + 1.5 (2014-04-08) ================ diff --git a/HACKING.txt b/HACKING.txt index e104869ec..91366cc28 100644 --- a/HACKING.txt +++ b/HACKING.txt @@ -191,6 +191,13 @@ Running Tests $ $VENV/bin/easy_install pytest $ py.test --strict pyramid/ +- Functional tests related to the "scaffolds" (starter, zodb, alchemy) which + create a virtualenv, install the scaffold package and its dependencies, start + a server, and hit a URL on the server can be run like so: + + $ tox py2-scaffolds + $ tox py3-scaffolds + Test Coverage ------------- diff --git a/RELEASING.txt b/RELEASING.txt index 0adef552c..c22c40000 100644 --- a/RELEASING.txt +++ b/RELEASING.txt @@ -18,7 +18,10 @@ Releasing Pyramid - Make sure all scaffold tests pass (Py 2.6, 2.7, 3.2, 3.3 and pypy on UNIX; this doesn't work on Windows): - $ python pyramid/scaffolds/tests.py + $ tox py3-scaffolds + $ tox py2-scaffolds + $ tox pypy-scaffolds + $ tox pypy3-scaffolds - Ensure all features of the release are documented (audit CHANGES.txt or communicate with contributors). diff --git a/pyramid/tests/test_request.py b/pyramid/tests/test_request.py index eedef3af2..2c2298f26 100644 --- a/pyramid/tests/test_request.py +++ b/pyramid/tests/test_request.py @@ -482,7 +482,6 @@ class Test_subclassing_Request(unittest.TestCase): def test_subclass(self): from pyramid.interfaces import IRequest from pyramid.request import Request - from zope.interface import providedBy, implementedBy class RequestSub(Request): pass diff --git a/tox.ini b/tox.ini index e0f99e7f6..e0ef2277b 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,8 @@ envlist = py26,py27,py32,py33,py34,pypy,pypy3, {py2,py3}-docs, - {py2,py3}-cover,coverage + {py2,py3}-cover,coverage, + scaffolds [testenv] # Most of these are defaults but if you specify any you can't fall back @@ -61,3 +62,27 @@ deps = coverage setenv = COVERAGE_FILE=.coverage + +[testenv:py3-scaffolds] +basepython = python3.4 +commands = + python pyramid/scaffolds/tests.py +deps = virtualenv + +[testenv:py2-scaffolds] +basepython = python2.7 +commands = + python pyramid/scaffolds/tests.py +deps = virtualenv + +[testenv:pypy-scaffolds] +basepython = pypy +commands = + python pyramid/scaffolds/tests.py +deps = virtualenv + +[testenv:pypy3-scaffolds] +basepython = pypy3 +commands = + python pyramid/scaffolds/tests.py +deps = virtualenv -- cgit v1.2.3