-
Notifications
You must be signed in to change notification settings - Fork 113
Open
Labels
Description
I have written a shiny app as a package and use relative imports to load the code from other modules.
This works fine and I can run the app via uvicorn myap.app:app
.
However, if I want to run tests with pytest, I get the relative import error. Which is strange, because my app is an actual package.
I assume the reason is that the fixture forces me to give the path to the app.py. I gues the module is then tested as a standalone module and not the project loaded as package.
Another thing I observed is that for shiny express the relative import works for testing, but not for running the app.