Switch out pyfakefs to using test files in the test directory
This would also allow running docker-compose exec web python manage.py test, since pyfakefs is only installed for development.
Alternatively, we could add a separate container like docker-compose run tests.
"The best code is not having any code" - @lemonsaurus
Just to make sure I understand your proposal, you'd like to simply write actual files to disk rather than faking the filesystem in tests? Should the tests also clean up those files in the teardown?
An alternative could be using a temporary directory instead of the tests folder. Ideally, it would get cleaned up between tests to avoid violating the test isolation principle.
Yet another alternative could be using a container for development that does include (some of) the development dependencies, although that would mean the development container is fundamentally different from the one built for production, which is less than ideal as well.
Just to make sure I understand your proposal, you'd like to simply write actual files to disk rather than faking the filesystem in tests?
Yes
Should the tests also clean up those files in the teardown?
No, the files would be present beforehand. I'm 99% sure we don't have anything that depends on "what happens if I move this file there" or "delete this file here and there", the idea is mostly to create a resource layout
Alright, they are just static test resources in that case. Cool, I'll have a stab at it.
Hi @SebastiaanZ, did you have some time to check out this issue or do you mind if I snag it from you?