[tox] Use py.test
authorDenis Laxalde <denis.laxalde@logilab.fr>
Fri, 11 Dec 2015 17:21:58 +0100
changeset 11603 c7bfeb7b0d67
parent 11602 0737f481b358
child 11604 18348ac158db
[tox] Use py.test Rename test view so that py.test does not consider it as a test function.
.hgignore
pyramid_cubicweb/tests/test_rest_api.py
tox.ini
--- a/.hgignore	Wed Nov 25 13:39:53 2015 +0100
+++ b/.hgignore	Fri Dec 11 17:21:58 2015 +0100
@@ -7,3 +7,4 @@
 
 docs/_build
 pyramid_cubicweb/tests/data/database
+.tox
--- a/pyramid_cubicweb/tests/test_rest_api.py	Wed Nov 25 13:39:53 2015 +0100
+++ b/pyramid_cubicweb/tests/test_rest_api.py	Fri Dec 11 17:21:58 2015 +0100
@@ -39,7 +39,7 @@
     request_method='GET',
     request_param=('test_rql_execute',)
 )
-def test_rql_execute_view(context, request):
+def rql_execute_view(context, request):
     """Return 500 response if rset.req is not a CubicWeb request.
     """
     if isinstance(context.rset.req, CubicWebPyramidRequest):
--- a/tox.ini	Wed Nov 25 13:39:53 2015 +0100
+++ b/tox.ini	Fri Dec 11 17:21:58 2015 +0100
@@ -4,9 +4,10 @@
 [testenv]
 sitepackages = true
 deps =
+  pytest
   webtest
   cubicweb-pyramid
   release: cubicweb
   dev: hg+http://hg.logilab.org/master/cubicweb@cubicweb-3.22#egg=cubicweb
 commands =
-  {envpython} -m unittest discover pyramid_cubicweb.tests -b {posargs}
+  {envpython} -m pytest pyramid_cubicweb/tests {posargs}