Skip to content

Commit

Permalink
shows we are recording coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
smirolo committed Sep 28, 2024
1 parent 5eae266 commit f71a9d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions testsite/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit f71a9d8

Please sign in to comment.