Repository: git-big-picture/git-big-picture (language: python)

Issue:
Replace nose testing dependency
The `nose` testing framework is dead. Need a replacement, either bare `unittest` or `pytest`?
Replace nose testing dependency
The `nose` testing framework is dead. Need a replacement, either bare `unittest` or `pytest`?


Discussion / hints:
I see! I'd be okay with either for a runner. If you go for pytest, let's agree to only use pytest for a runner and to not turn the testsuite pytesty on the inside (e.g. because it raises the bar of entry by quite a bit). Would that be okay?
That would be okay, yes. 

On 4 January 2021 22:06:09 CET, Sebastian Pipping <notifications@github.com> wrote:
>I see! I'd be okay with either for a runner. If you go for pytest,
>let's agree to only use pytest for a runner and to not turn the
>testsuite pytesty on the inside (e.g. because it raises the bar of
>entry by quite a bit). Would that be okay?
>
>-- 
>You are receiving this because you authored the thread.
>Reply to this email directly or view it on GitHub:
>https://github.com/git-big-picture/git-big-picture/issues/63#issuecomment-754218527

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
I see! I'd be okay with either for a runner. If you go for pytest, let's agree to only use pytest for a runner and to not turn the testsuite pytesty on the inside (e.g. because it raises the bar of entry by quite a bit). Would that be okay?
That would be okay, yes. 

On 4 January 2021 22:06:09 CET, Sebastian Pipping <notifications@github.com> wrote:
>I see! I'd be okay with either for a runner. If you go for pytest,
>let's agree to only use pytest for a runner and to not turn the
>testsuite pytesty on the inside (e.g. because it raises the bar of
>entry by quite a bit). Would that be okay?
>
>-- 
>You are receiving this because you authored the thread.
>Reply to this email directly or view it on GitHub:
>https://github.com/git-big-picture/git-big-picture/issues/63#issuecomment-754218527

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Fix patch:
diff --git a/README.rst b/README.rst
index b7efc48..38805f8 100644
--- a/README.rst
+++ b/README.rst
@@ -96,7 +96,7 @@ Dependencies
 * Python >=3.6
 * Git (1.7.1 works)
 * Graphviz utility
-* Nosetest and Scruf (only for running tests)
+* pytest and Scruf (only for running tests)
 
 Installation
 ------------
@@ -392,7 +392,7 @@ configured in file ``.pre-commit-config.yaml``.
 Testing
 -------
 
-The Python code is tested with `nose <https://nose.readthedocs.org/en/latest/>`_:
+The Python code is tested with test runner `pytest <https://pytest.org>`_:
 
 .. code:: console
 


Test patch:
diff --git a/run-tests-with-coverage.sh b/run-tests-with-coverage.sh
index 32a8581..9859a49 100755
--- a/run-tests-with-coverage.sh
+++ b/run-tests-with-coverage.sh
@@ -66,7 +66,7 @@ SITECUSTOMIZE_PY_EOF
 exit_code=0
 coverage erase
 
-coverage run ${venv}/bin/nosetests "${source_dir}"/test.py \
+coverage run ${venv}/bin/pytest "${source_dir}"/test.py \
     || exit_code=$?
 PATH="${source_dir}:${PATH}" COVERAGE_PROCESS_START=.coveragerc \
     coverage run ${venv}/bin/scruf "${source_dir}"/test.scf \
diff --git a/test.py b/test.py
index 7dff410..74a296c 100755
--- a/test.py
+++ b/test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env nosetests
+#!/usr/bin/env pytest
 #
 # This file is part of git-big-picture
 #
diff --git a/test_requirements.txt b/test_requirements.txt
index 37a3121..d002b21 100644
--- a/test_requirements.txt
+++ b/test_requirements.txt
@@ -1,3 +1,3 @@
 coverage
 scruf
-nose
+pytest