[lxc-devel] [pylxd/master] Switch to pytest

d0ugal on Github lxc-bot at linuxcontainers.org
Fri Dec 4 16:22:14 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 302 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20201204/ea1c37bf/attachment.bin>
-------------- next part --------------
From c7b5c6b65d24f57174e58c97e9708589662f8d19 Mon Sep 17 00:00:00 2001
From: Dougal Matthews <dougal at dougalmatthews.com>
Date: Fri, 4 Dec 2020 16:21:39 +0000
Subject: [PATCH] Switch to pytest

---
 setup.cfg             | 3 ---
 test-requirements.txt | 4 ++--
 tox.ini               | 6 +++---
 3 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/setup.cfg b/setup.cfg
index 55144ac4..7b176763 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -49,6 +49,3 @@ input_file = pylxd/locale/pylxd.pot
 keywords = _ gettext ngettext l_ lazy_gettext
 mapping_file = babel.cfg
 output_file = pylxd/locale/pylxd.pot
-
-[nosetests]
-nologcapture=1
diff --git a/test-requirements.txt b/test-requirements.txt
index 6357aeeb..b0bb1f91 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -1,8 +1,8 @@
 ddt>=0.7.0
-nose>=1.3.7
+pytest>=6.1.2
 mock>=1.3.0
-coverage>=4.1
 mock-services>=0.3
 # mock-services is old and unmaintained. Doesn't work with newer versions of
 # requests-mock. Thus, we have to pin it down.
 requests-mock<1.2
+pytest-cov==2.10.1
diff --git a/tox.ini b/tox.ini
index a0fb1be6..3778d7b7 100644
--- a/tox.ini
+++ b/tox.ini
@@ -11,13 +11,13 @@ setenv =
    PYLXD_WARNINGS=none
 deps =
    -r{toxinidir}/test-requirements.txt
-commands = nosetests --with-coverage --cover-package=pylxd pylxd
+commands = pytest --cov=pylxd pylxd
 
 [testenv:integration]
-commands = nosetests integration
+commands = pytest pytest integration
 
 [testenv:migration]
-commands = nosetests migration
+commands = pytest migration
 
 [testenv:format]
 basepython=python3


More information about the lxc-devel mailing list