You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The thing is, I don't think I understand how paths are treated by pytest-watch. I'm able to run the command above successfully, but when I try to use pytest-watch in a similar fashion, I'm getting an error along the lines of
ImportError: No module named 'settings'
pytest-django could not find a Django project (no manage.py file could be found). You must explicitly add your Django project to the Python path to have it picked up.
In the code below, I am explicitly adding the django project to the python path with sys.path.insert(0, "examples/simple").
I've only really used pytest-watch as a consumer of it, but I'm up for having a go at making a PR if some extra code is needed to support it.
I could of course just be using it wrong - if this is the case, any chance of a pointer to see what I ought to be doing to get paths recognised properly?
Ta
The text was updated successfully, but these errors were encountered:
Hi there,
I'm trying to work out how to run pytest-watch programatically, a bit like how this example of pytest is run here, so I can run it from within python,
https://github.com/barseghyanartur/django-elasticsearch-dsl-drf/blob/master/runtests.py
The thing is, I don't think I understand how paths are treated by pytest-watch. I'm able to run the command above successfully, but when I try to use pytest-watch in a similar fashion, I'm getting an error along the lines of
In the code below, I am explicitly adding the django project to the python path with
sys.path.insert(0, "examples/simple")
.I've only really used pytest-watch as a consumer of it, but I'm up for having a go at making a PR if some extra code is needed to support it.
I could of course just be using it wrong - if this is the case, any chance of a pointer to see what I ought to be doing to get paths recognised properly?
Ta
The text was updated successfully, but these errors were encountered: