From 750c83fdb0736cc139e029ed7ec2d9ce98c47248 Mon Sep 17 00:00:00 2001
From: Andre Anjos <andre.dos.anjos@gmail.com>
Date: Mon, 16 Nov 2020 19:15:13 +0100
Subject: [PATCH] [templates] Suggest using pytest instead of nose for test
 runs

---
 bob/devtools/templates/conda/meta.yaml | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/bob/devtools/templates/conda/meta.yaml b/bob/devtools/templates/conda/meta.yaml
index 55925da6..f7b04793 100644
--- a/bob/devtools/templates/conda/meta.yaml
+++ b/bob/devtools/templates/conda/meta.yaml
@@ -36,7 +36,9 @@ test:
   imports:
     - {{ name }}
   commands:
-    - nosetests --with-coverage --cover-package={{ name }} --cover-erase --cover-html-dir={{ project_dir }}/sphinx/coverage --cover-xml-file={{ project_dir }}/coverage.xml -sv {{ name }}
+    # runs tests for package only, report only what is in the package
+    # creates html and xml reports and place them in specific directories
+    - pytest --verbose --cov {{ name }} --cov-report term-missing --cov-report html:{{ project_dir }}/sphinx/coverage --cov-report xml:{{ project_dir }}/coverage.xml --pyargs {{ name }}
     - sphinx-build -aEW {{ project_dir }}/doc {{ project_dir }}/sphinx
     - sphinx-build -aEb doctest {{ project_dir }}/doc sphinx
     - conda inspect linkages -p $PREFIX {{ name }}  # [not win]
@@ -44,7 +46,8 @@ test:
   requires:
     - bob-devel {{ bob_devel }}.*(% if group == 'beat' %)
     - beat-devel {{ beat_devel }}.*(% endif %)
-    - nose
+    - pytest
+    - pytest-cov
     - coverage
     - sphinx
     - sphinx_rtd_theme
-- 
GitLab