[PATCH 09 of 10 logilab-database] [mod] migrate to pytest

Laurent Peuch cortex at worlddomination.be
Fri Apr 3 09:14:17 CEST 2020


# HG changeset patch
# User Laurent Peuch <cortex at worlddomination.be>
# Date 1585791243 -7200
#      Thu Apr 02 03:34:03 2020 +0200
# Node ID 62ed8ca247985cc3c60c78e5c5da83aa20ecc162
# Parent  57b15060a8e1a2decd8b74bc18ba86125efa5e52
# Available At https://hg.logilab.org/users/lpeuch/logilab-database
#              hg pull https://hg.logilab.org/users/lpeuch/logilab-database -r 62ed8ca24798
# EXP-Topic good-practice-modernisation
[mod] migrate to pytest

diff --git a/tox.ini b/tox.ini
--- a/tox.ini
+++ b/tox.ini
@@ -3,9 +3,13 @@ envlist=py3,check-manifest,flake8,black,
 
 [testenv]
 deps =
+  pytest
   psycopg2
 commands=
-    {envpython} -m unittest discover -s test {posargs:-p unittest_*.py}
+    {envpython} -m pytest {posargs:{toxinidir}/test}
+
+[pytest]
+python_files = *test_*.py
 
 [testenv:check-manifest]
 skip_install = true



More information about the cubicweb-devel mailing list