diff --git a/Dockerfile b/Dockerfile index 978b23e..6897a36 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,8 @@ FROM python:3.7-slim-bullseye RUN python -m venv /app +# Make sure a 'db.sqlite' file exists in '.' if you want to launch the container +# without referencing an external database. COPY . /app/reps/djaodjin-deployutils WORKDIR /app/reps/djaodjin-deployutils RUN /app/bin/pip install -r testsite/requirements.txt diff --git a/testsite/wsgi.py b/testsite/wsgi.py index fc8123e..d604d78 100644 --- a/testsite/wsgi.py +++ b/testsite/wsgi.py @@ -18,8 +18,10 @@ def save_coverage(): if os.getenv('DJANGO_COVERAGE'): import atexit, sys import coverage - cov = coverage.coverage(data_file=os.path.join(os.getenv('DJANGO_COVERAGE'), - ".coverage.%d" % os.getpid())) + data_file=os.path.join(os.getenv('DJANGO_COVERAGE'), + ".coverage.%d" % os.getpid()) + cov = coverage.coverage(data_file=data_file) + sys.stderr.write("start recording coverage in %s\n" % str(data_file)) cov.start() atexit.register(save_coverage) try: