Skip to content

Commit b53c18c

Browse files
committed
Fix test script to work with coverage >= 7.8.0
Breakage caused by coverage fixing its PYTHONSAFEPATH behaviour: coveragepy/coveragepy#1696
1 parent 94d6167 commit b53c18c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

testmanage.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@
66
import sys
77
import warnings
88

9+
10+
# The current directory isn't on the path when GitHub Actions / tox run this
11+
# with 'python -Im coverage run', due to PYTHONSAFEPATH protection.
12+
# We explicitly add it here as otherwise we can't reach the tests.
13+
if "." not in sys.path:
14+
sys.path.insert(0, ".")
15+
916
from django.core.management import execute_from_command_line
1017

1118

0 commit comments

Comments
 (0)