diff options
| -rw-r--r-- | tests/gunicorn_utils.py | 6 | 
1 files changed, 6 insertions, 0 deletions
| diff --git a/tests/gunicorn_utils.py b/tests/gunicorn_utils.py index 5c077aa..15a2b58 100644 --- a/tests/gunicorn_utils.py +++ b/tests/gunicorn_utils.py @@ -33,6 +33,12 @@ def _proc_target(config_path: str, event: multiprocessing.Event, **kwargs) -> No      def when_ready(_):          event.set() +    # Clear sys.argv to prevent Gunicorn from trying to interpret the command arguments +    # used to run the test as it's own arguments. +    import sys + +    sys.argv = [""] +      app = _StandaloneApplication(config_path, when_ready=when_ready, **kwargs)      import logging | 
