summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--.travis.yml21
-rw-r--r--pyramid/tests/test_config/pkgs/asset/models.py8
-rw-r--r--pyramid/tests/test_config/pkgs/asset/views.py22
-rw-r--r--pyramid/tests/test_scripts/pystartup.py1
-rw-r--r--pyramid/tests/test_scripts/pystartup.txt3
-rw-r--r--pyramid/tests/test_scripts/test_pshell.py2
-rw-r--r--setup.cfg1
-rw-r--r--tox.ini27
9 files changed, 32 insertions, 56 deletions
diff --git a/.gitignore b/.gitignore
index 8dca2069c..b60cd530a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,9 +7,12 @@
*~
.*.swp
.coverage
+.coverage.*
.tox/
nosetests.xml
coverage.xml
+nosetests-*.xml
+coverage-*.xml
tutorial.db
build/
dist/
diff --git a/.travis.yml b/.travis.yml
index e2f379802..7cf2b6a16 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,16 +1,15 @@
# Wire up travis
language: python
-#
-#env:
-# - TOXENV=clean
-# - TOXENV=py26
-# - TOXENV=py27
-# - TOXENV=py32
-# - TOXENV=py33
-# - TOXENV=py34
-# - TOXENV=pypy
-# - TOXENV=pypy3
-# - TOXENV=report
+
+env:
+ - TOXENV=py26
+ - TOXENV=py27
+ - TOXENV=py32
+ - TOXENV=py33
+ - TOXENV=py34
+ - TOXENV=pypy
+ - TOXENV=pypy3
+ - TOXENV=py26,py32,cover
install:
- travis_retry pip install tox
diff --git a/pyramid/tests/test_config/pkgs/asset/models.py b/pyramid/tests/test_config/pkgs/asset/models.py
deleted file mode 100644
index d80d14bb3..000000000
--- a/pyramid/tests/test_config/pkgs/asset/models.py
+++ /dev/null
@@ -1,8 +0,0 @@
-from zope.interface import Interface
-
-class IFixture(Interface):
- pass
-
-def fixture():
- """ """
-
diff --git a/pyramid/tests/test_config/pkgs/asset/views.py b/pyramid/tests/test_config/pkgs/asset/views.py
deleted file mode 100644
index cbfc5a574..000000000
--- a/pyramid/tests/test_config/pkgs/asset/views.py
+++ /dev/null
@@ -1,22 +0,0 @@
-from zope.interface import Interface
-from webob import Response
-from pyramid.httpexceptions import HTTPForbidden
-
-def fixture_view(context, request):
- """ """
- return Response('fixture')
-
-def erroneous_view(context, request):
- """ """
- raise RuntimeError()
-
-def exception_view(context, request):
- """ """
- return Response('supressed')
-
-def protected_view(context, request):
- """ """
- raise HTTPForbidden()
-
-class IDummy(Interface):
- pass
diff --git a/pyramid/tests/test_scripts/pystartup.py b/pyramid/tests/test_scripts/pystartup.py
deleted file mode 100644
index c4e5bcc80..000000000
--- a/pyramid/tests/test_scripts/pystartup.py
+++ /dev/null
@@ -1 +0,0 @@
-foo = 1
diff --git a/pyramid/tests/test_scripts/pystartup.txt b/pyramid/tests/test_scripts/pystartup.txt
new file mode 100644
index 000000000..c62c4ca74
--- /dev/null
+++ b/pyramid/tests/test_scripts/pystartup.txt
@@ -0,0 +1,3 @@
+# this file has a .txt extension to avoid coverage reports
+# since it is not imported but rather the contents are read and exec'd
+foo = 1
diff --git a/pyramid/tests/test_scripts/test_pshell.py b/pyramid/tests/test_scripts/test_pshell.py
index a6ba2eaea..dab32fecd 100644
--- a/pyramid/tests/test_scripts/test_pshell.py
+++ b/pyramid/tests/test_scripts/test_pshell.py
@@ -379,7 +379,7 @@ class TestPShellCommand(unittest.TestCase):
os.path.abspath(
os.path.join(
os.path.dirname(__file__),
- 'pystartup.py')))
+ 'pystartup.txt')))
shell = dummy.DummyShell()
command.run(shell)
self.assertEqual(self.bootstrap.a[0], '/foo/bar/myapp.ini#myapp')
diff --git a/setup.cfg b/setup.cfg
index bc092a6ca..875480594 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -5,7 +5,6 @@ zip_ok = false
match=^test
where=pyramid
nocapture=1
-cover-package=pyramid
[aliases]
dev = develop easy_install pyramid[testing]
diff --git a/tox.ini b/tox.ini
index ba0007d7a..dae31ddd6 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,24 +1,27 @@
[tox]
+skipsdist = True
envlist =
- clean,py26,py27,py32,py33,py34,pypy,pypy3,report
-
-[testenv:clean]
-commands = coverage erase
-deps = coverage
+ py26,py27,py32,py33,py34,pypy,pypy3,cover
[testenv]
commands =
- python setup.py dev
- python setup.py nosetests --with-coverage
+ {envbindir}/python setup.py dev
+ {envbindir}/coverage run --source={toxinidir}/pyramid {envbindir}/nosetests --xunit-file=nosetests-{envname}.xml
+ {envbindir}/coverage xml -o coverage-{envname}.xml
+setenv =
+ COVERAGE_FILE=.coverage.{envname}
-[testenv:report]
+[testenv:cover]
commands =
- python setup.py dev
- python setup.py nosetests --with-xunit --with-xcoverage --cover-min-percentage=100
+ {envbindir}/coverage erase
+ {envbindir}/coverage combine
+ {envbindir}/coverage xml
+ {envbindir}/coverage report --show-missing --fail-under=100
deps =
- nosexcover
+ coverage
+setenv =
+ COVERAGE_FILE=.coverage
# we separate coverage into its own testenv because a) "last run wins" wrt
# cobertura jenkins reporting and b) pypy and jython can't handle any
# combination of versions of coverage and nosexcover that i can find.
-