From 4da9932c24ad7c124e301b6825dccc4ccd5b30bf Mon Sep 17 00:00:00 2001 From: Thom Smith Date: Wed, 22 Sep 2021 12:07:35 -0400 Subject: [PATCH] Move signal import to top and add explanatory comment --- tests/lib/test_constructor.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/lib/test_constructor.py b/tests/lib/test_constructor.py index 8ed1928d..0a0650b3 100644 --- a/tests/lib/test_constructor.py +++ b/tests/lib/test_constructor.py @@ -5,6 +5,9 @@ import datetime import yaml.tokens +# Used in the construct-python-name-module test. +import signal + def execute(code): global value exec(code) @@ -290,7 +293,6 @@ def test_subclass_blacklist_types(data_filename, verbose=False): test_subclass_blacklist_types.unittest = ['.subclass_blacklist'] -import signal if __name__ == '__main__': import sys, test_constructor sys.modules['test_constructor'] = sys.modules['__main__']