Re: %global __pytest_addopts or export PYTEST_ADDOPTS?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 20. 02. 24 13:10, Richard W.M. Jones wrote:
For %{pytest} in Fedora there seem to be two possible ways to add
options eg for skipping tests, both working.

Either:

%global __pytest_addopts --options ...
(see attachment for example)

Or:

export PYTEST_ADDOPTS="--options ..."
(example: https://src.fedoraproject.org/rpms/scipy/blob/rawhide/f/scipy.spec#_228)

Is there a preferred way?

The %__pytest_addopts macro exists for other macros to be able to inject stuff into %pytest: e.g. https://src.fedoraproject.org/rpms/pyproject-rpm-macros/blob/rawhide/f/macros.pyproject#_28

The preferred (and I would say the most natural way) to pass options to pytest is to pass them to %pytest directly, e.g.:

  %pytest -m "not network"

However, in case the options are long, manipulating PYTEST_ADDOPTS is also an option, as shown in scipy.

--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok
--
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux