diff options
author | 2023-06-22 12:48:25 +0000 | |
---|---|---|
committer | 2023-06-22 12:53:08 +0000 | |
commit | 283130f971f8ed5d40da024013812fa104285690 (patch) | |
tree | 8fd1fc8bd8c152adf02b59f8dafc0e40ae32a899 | |
parent | Merge pull request #178 from python-discord/fix-status-badge (diff) |
Fix issue when running individual integration tests
-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 |