Re: python-m3u8: how to get %pytest working

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

 



On 09. 08. 22 16:45, Martin Gansser wrote:
Hi,

how do i get %pytest on the python-m3u8 package to work ?
I have already made several attempts which fail.

%check
#%%{pytest} -vv --cov-report term-missing --cov m3u8 tests/
#%%{__python3} -m pytest tests/m3u8server.py

Hi Martin,

It would certainly be helpful if you specified:

 - What do you expect to happen?
 - What actually happens instead?


A simple approach like this:

  %check
  %pytest -vv

Makes the test run. Three tests fail because they require internet, you need to deselect them:

  %check
  # 3 deselected tests require internet connection
  %pytest -vv -k "not (test_load_should_ and (uri or redirect))"

If you want to make it cool, talk to upstream and add a marker that maeks the tests as such, then you could use simpler:

  %check
  %pytest -vv -m "not internet"



As a side note, running --cov is discouraged:

https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters



[1] https://martinkg.fedorapeople.org/Packages/test/python-m3u8-3.1.0-1.fc36....

https://martinkg.fedorapeople.org/Packages/test/python-m3u8-3.1.0-1.fc36.src.rpm

--
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