From 6bbd58c76f89a8e6c1e2f137bf0a84501eebe992 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Fri, 3 May 2019 23:52:23 +0400 Subject: [PATCH] :memo: Update docs for running tests live --- {{cookiecutter.project_slug}}/README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/{{cookiecutter.project_slug}}/README.md b/{{cookiecutter.project_slug}}/README.md index bc75538..752ec0e 100644 --- a/{{cookiecutter.project_slug}}/README.md +++ b/{{cookiecutter.project_slug}}/README.md @@ -134,6 +134,22 @@ If you need to install any additional package for the tests, add it to the file If you use GitLab CI the tests will run automatically. +#### Test running stack + +If your stack is already up and you just want to run the tests, you can use: + +```bash +docker-compose exec backend-tests /tests-start.sh +``` + +That `/tests-start.sh` script inside the `backend-tests` container calls `pytest`. If you need to pass extra arguments to `pytest`, you can pass them to that command and they will be forwarded. + +For example, to stop on first error: + +```bash +docker-compose exec backend-tests /tests-start.sh -x +``` + ### Live development with Python Jupyter Notebooks If you know about Python [Jupyter Notebooks](http://jupyter.org/), you can take advantage of them during local development.