On 27-10-2022 17:25, Miro Hrončok wrote:
On 26. 10. 22 19:40, Sandro wrote:
Hi,

I'm getting the ImportError from subject specifically when
building python-plotnine for f36 (Python 3.10.7).

Yes, importing from .conftest in tests should not be possible.


The same package builds fine for f37 and rawhide (Python 3.11.0).

Maybe pytest somehow made this work? It¨s not just Python 3.11 but
also pytest 7.

True. I guess this needs to be reported upstream then.

The module the test is trying to import from is present in tests/,
so I'm a bit stupefied as to why this fails. I also tried with
putting an empty __init__.py in tests/. But this fails with an
OSError in conftest.py.

Do you happen to have the exact OSError with a traceback? Maybe it's
not related.

I do:

../../BUILDROOT/python-plotnine-0.10.1-2.fc36.x86_64/usr/lib/python3.10/site-packages/tests/conftest.py:30: in <module>
    raise OSError(
E OSError: The baseline image directory does not exist. This is most likely because the test data is not installed. You may need to install plotnine from source to get the test data.

This is caused by a test in conftest.py itself:

https://github.com/has2k1/plotnine/blob/1da5d2b739e904f2c1ce97d2ba4e3a84129d0332/tests/conftest.py#L29

-- Sandro
_______________________________________________
python-devel mailing list -- python-devel@lists.fedoraproject.org
To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org
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/python-devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to