check: fix pytest

- more verbose pytest
- document it in README.md
- /bin/pytest fails with el8 for some reason, stay on nosetests-3

Closes: #54
Closes: #58
This commit is contained in:
Pavel Raiskup 2023-01-04 16:34:39 +01:00 committed by Miroslav Suchý
parent ea481483c4
commit 954f0ea93b
2 changed files with 12 additions and 4 deletions

View file

@ -105,7 +105,7 @@ Developer Guide
#### Unit tests
```
nosetests -vs .
$ pytest -v .
```
#### Integration tests

View file

@ -50,7 +50,11 @@ Requires: python3-requests
Recommends: python3-grokmirror
Suggests: python3-fedmsg
Suggests: fedora-messaging
%if 0%{?rhel} == 8
BuildRequires: python3-nose
%else
BuildRequires: python3-pytest
%endif
BuildRequires: python3-parameterized
BuildRequires: python3-requests
@ -115,10 +119,14 @@ exit 0
%check
%if 0%{?rhel} && 0%{?rhel} < 8
nosetests .
%if 0%{?rhel} && 0%{?rhel} <= 8
%if 0%{?rhel} < 8
nosetests -v .
%else
pytest
nosetests-3 -v .
%endif
%else
pytest -vv .
%endif