https://bugzilla.redhat.com/show_bug.cgi?id=1714377
--- Comment #12 from Miro Hrončok mhroncok@redhat.com --- I like the double conditional, but I'd call it --with privileged_tests (that's a gain a matter of style and feel free to keep as is).
The %check section can be simplified:
%if %{with check} %check PYTHONPATH=%{buildroot}%{python3_sitelib} \ pytest-3 \ -v \ --disable-pytest-warnings \ --numprocesses=auto \ %if %{with privileged_tests} tests %else tests/unit %endif %endif