testdrivenio / fastapi-crud-async

FastAPI CRUD

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue renaming test_main.py to test_ping.py

AngelaO opened this issue · comments

Thanks for the great tutorial! Whilst working through it I came upon an issue when renaming test_main.py file to test_ping.py - after renaming running the tests fails with the error: E AssertionError: PosixPath('/usr/src/app/tests/test_ping.py') is not a file (isdir=False, exists=True, islink=False)

I found it was necessary to delete the container and then rebuild without cache using docker compose build --no-cache in order for the tests to be discoverable and run correctly after changing the name of the original test file. Not sure if this issue is worth updating the tutorial to reflect in case others run into the same error.