diff options
author | Graham Dumpleton <Graham.Dumpleton@gmail.com> | 2022-05-02 11:02:32 +1000 |
---|---|---|
committer | Graham Dumpleton <Graham.Dumpleton@gmail.com> | 2022-05-02 11:02:32 +1000 |
commit | 38c4b406c4fe0bcd0ca35d491f517ade0f4b8923 (patch) | |
tree | e6fbe16ce936b6dfa71b19d3a74edc0e49f317f1 | |
parent | b15fca21f6a3e7d2831209288b97a127be558abc (diff) | |
download | mod_wsgi-38c4b406c4fe0bcd0ca35d491f517ade0f4b8923.tar.gz |
Use nested function so can test stack backtraces over multiple frames.
-rw-r--r-- | tests/events.wsgi | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/events.wsgi b/tests/events.wsgi index 228ef11..0f7e778 100644 --- a/tests/events.wsgi +++ b/tests/events.wsgi @@ -54,6 +54,9 @@ def atexit_handler(): atexit.register(atexit_handler) +def do_sleep(duration): + time.sleep(duration) + def application(environ, start_response): failure_mode = environ.get('HTTP_X_FAILURE_MODE', '') failure_mode = failure_mode.split() @@ -74,7 +77,7 @@ def application(environ, start_response): environ['wsgi.input'].read() if sleep_duration: - time.sleep(sleep_duration) + do_sleep(sleep_duration) try: yield output |