chmp / ipytest

Pytest in IPython notebooks.
MIT License
314 stars 17 forks source link

How to get fixtures from conftest.py #101

Closed stuaxo closed 9 months ago

stuaxo commented 1 year ago

I tried using this with a django project, and things seem OK, except the fixtures in my (django) project are not picked up - any idea how I can get those to work ?

EDIT: The fixtures are in conftest.py in the project root and other places that have unit tests, when I run pytest manually these are picked up.

chmp commented 1 year ago

Hi @stuaxo

thanks for the report. For simple fixtures discovery from conftest.py files seem to work out of the box. I added some test here. For the newly added notebooks, the value_from_conftest fixture is picked up correctly.

Do you have more information on the directory layout or an example you can share?

chmp commented 9 months ago

I will close this issue, as I can't reproduce it. Feel free to re-open.