From 058a1378ffb70ca67a106d7dd87ed30c111996fa Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Sat, 22 Apr 2023 12:36:00 +0200 Subject: [PATCH] tox.ini: run compile_translations before tests --- setup.py | 1 + tox.ini | 1 + 2 files changed, 2 insertions(+) diff --git a/setup.py b/setup.py index 4a1908f..ecf60b3 100644 --- a/setup.py +++ b/setup.py @@ -56,6 +56,7 @@ class compile_translations(Command): def run(self): try: + os.environ.pop('DJANGO_SETTINGS_MODULE', None) from django.core.management import call_command for path, dirs, files in os.walk('bijoe'): diff --git a/tox.ini b/tox.ini index 11cf41e..d9eeaf4 100644 --- a/tox.ini +++ b/tox.ini @@ -45,6 +45,7 @@ deps = django32: djangorestframework>=3.7 django32: https://git.entrouvert.org/entrouvert/hobo/archive/main.tar.gz commands = + python setup.py compile_translations py3-django32: py.test {posargs: --junitxml=test_{envname}_results.xml --cov-report xml --cov-report html --cov=bijoe --cov-config=tox.ini --numprocesses {env:NUMPROCESSES:1} tests/} [pytest]