Set up a virtual environment and activate it:
python3 -m venv .venv
source .venv/bin/activate
Install dependencies:
pip install -r requirements.txt
run tests:
python3 -m pytest tests/
Build the image:
docker build -t test-builder .
Run the container with a mounted volume:
docker run -it -v $(pwd):/app test-builder
This will give you access to your files within the container and run the container in interactive mode with shell access. You can then run tests inside the container using:
python -m pytest tests/
or
python3 -m pytest tests/
To exit the container's shell:
exit