On 27. 04. 20 15:47, Scott Talbert wrote:
On Mon, 27 Apr 2020, Miro Hrončok wrote:
> Hello Python packagers,
>
> since there is no upstream supported universal test invocation for Python
> (`python setup.py test` is deprecated and the de-facto-standard `tox` doesn't
> always do what we want in RPM's %check and/or is not always used by upstreams)
> and a lot of upstreams use pytest, I'd like to propose a %pytest macros, for
> standardizing the way pytest is run.
>
> Usage:
>
> %check
> %pytest
>
> Or with options passed to pyets:
>
> %check
> %pytest -v -m "not network" tests/
>
I like the idea!
I have run into the issue of not wanting $PWD in sys.path before as well, so it
would be great to solve that.
Will pu(n)t it to my far future TODO.
The only other thing that I might suggest is to set
PYTHONDONTWRITEBYTECODE=1 so
we don't get pytest bytecode written out.
Good point, will do. Thanks.
--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok