From cef7a6041740b9edd80c294b8d671ef05ad8f37b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rajmund=20Hru=C5=A1ka?= <rajmund.hruska@cesnet.cz>
Date: Tue, 21 Jun 2022 16:53:03 +0000
Subject: [PATCH] Feature: Use nose2

---
 .gitlab-ci.yml       | 2 +-
 Makefile             | 2 +-
 nose2.cfg            | 2 ++
 requirements-dev.pip | 2 +-
 4 files changed, 5 insertions(+), 3 deletions(-)
 create mode 100644 nose2.cfg

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index dfcba0f..bdb2c7f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -39,7 +39,7 @@ unit-test-job:
     paths:
       - errors.log
     reports:
-      junit: nosetests.xml
+      junit: nose2-junit.xml
 
 pylint-test-job:
   stage: test
diff --git a/Makefile b/Makefile
index 8a24713..4a4e656 100644
--- a/Makefile
+++ b/Makefile
@@ -120,7 +120,7 @@ pylint-test: FORCE
 
 test: FORCE
 	@echo "\n${GREEN}*** Checking code with nosetests ***${NC}\n"
-	@$(PYTHON) -W always::DeprecationWarning -m nose --with-xunit
+	@$(PYTHON) -W always::DeprecationWarning -m nose2 --junit-xml
 
 
 #-------------------------------------------------------------------------------
diff --git a/nose2.cfg b/nose2.cfg
new file mode 100644
index 0000000..a7850f0
--- /dev/null
+++ b/nose2.cfg
@@ -0,0 +1,2 @@
+[unittest]
+plugins = nose2.plugins.junitxml
diff --git a/requirements-dev.pip b/requirements-dev.pip
index e92d9cb..8521198 100644
--- a/requirements-dev.pip
+++ b/requirements-dev.pip
@@ -2,7 +2,7 @@ setuptools
 wheel
 twine
 docutils<0.18
-nose==1.3.7
+nose2
 pyflakes==2.1.0
 pylint==2.2.2
 sphinx==1.8.4
-- 
GitLab