Skip to content

Commit 283130f

Browse files
committed
Fix issue when running individual integration tests
1 parent 743c40c commit 283130f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/gunicorn_utils.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ def _proc_target(config_path: str, event: multiprocessing.Event, **kwargs) -> No
3333
def when_ready(_):
3434
event.set()
3535

36+
# Clear sys.argv to prevent Gunicorn from trying to interpret the command arguments
37+
# used to run the test as it's own arguments.
38+
import sys
39+
40+
sys.argv = [""]
41+
3642
app = _StandaloneApplication(config_path, when_ready=when_ready, **kwargs)
3743

3844
import logging

0 commit comments

Comments
 (0)