Skip to content
Snippets Groups Projects
Commit 5b85b3bc4857 authored by Laurent Peuch's avatar Laurent Peuch
Browse files

chore(tox): migrate to pytest

parent 006e61fb1b77
No related branches found
No related tags found
2 merge requests!44refactor: remove p27 tests,!39Draft: feat(setup.py): increase cubicweb max version to 3.31.x
......@@ -35,7 +35,7 @@
from cubicweb_jsonschema import testing
def testcase_cls(test):
def _testcase_cls(test):
"""Return a unittest TestCase subclass to run `test` doctest."""
# build class name from doctest's filename (slugify, camelcase)
basename, __ = path.splitext(path.basename(test.filename))
......@@ -137,7 +137,7 @@
return response
def setUp(test):
tccls = testcase_cls(test)
tccls = _testcase_cls(test)
testing.setUp(test, tccls, ['webapp', 'login'])
client = test.globs['client'] = test.globs.pop('webapp')
client.get_schema = partial(get_schema, client)
......
......@@ -4,5 +4,5 @@
[testenv]
deps =
-rtest-requirements.txt
coverage
pytest
commands =
......@@ -8,6 +8,5 @@
commands =
{envpython} -m coverage run -m unittest discover -s test -c {posargs}
{envpython} -m coverage report
{envpython} -m pytest {posargs:test}
[testenv:no-coverage]
deps =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment