I recently tried to use my go-to pytest-mock in a test for tasks and realized I couldn't add dev dependencies to a task. I then realized that pytest is being installed inside all task containers, which I couldn't understand for the life of me until I saw it was being smuggled in with the metr-task-standard. I'd like to propose the following:
- We add another
task-test stage to the dockerfile that extends the final task stage. This stage installs pytest and also looks for requirements.dev.txt and installs them.
- Use the
task-test stage when building the docker image for viv task test
- Remove
pytest as a dependency of metr-task-standard
I recently tried to use my go-to
pytest-mockin a test for tasks and realized I couldn't add dev dependencies to a task. I then realized thatpytestis being installed inside all task containers, which I couldn't understand for the life of me until I saw it was being smuggled in with themetr-task-standard. I'd like to propose the following:task-teststage to the dockerfile that extends the finaltaskstage. This stage installspytestand also looks forrequirements.dev.txtand installs them.task-teststage when building the docker image forviv task testpytestas a dependency ofmetr-task-standard