diff options
| author | Jordan Wiens <jordan@psifertex.com> | 2021-09-01 01:51:39 -0400 |
|---|---|---|
| committer | Jordan Wiens <jordan@psifertex.com> | 2021-09-01 01:51:39 -0400 |
| commit | febe6fc6b70eb82a75bb9b564cc310af6c42dbfa (patch) | |
| tree | 4311508b6cbeb2a635e74b24cb0bdbec52bcb87c | |
| parent | 5d5ca0daf8afaf5013007d2f79332d1c5298586d (diff) | |
prevent user settings and plugins from influencing unit test generation
| -rwxr-xr-x | suite/generator.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/suite/generator.py b/suite/generator.py index 5c9ebf16..c251a89a 100755 --- a/suite/generator.py +++ b/suite/generator.py @@ -7,6 +7,11 @@ from optparse import OptionParser import testcommon import time +#Prevent user settings or plugins from impacting unit tests +os.environ["BN_DISABLE_USER_PLUGINS"] = "True" +os.environ["BN_DISABLE_USER_SETTINGS"] = "True" +os.environ["BN_DISABLE_REPOSITORY_PLUGINS"] = "True" + if sys.version_info.major == 2: print("Generate unit tests on Python 3. Python 2 is not compatible.") sys.exit(1) @@ -21,6 +26,11 @@ import zipfile import difflib from collections import Counter +#Prevent user settings or plugins from impacting unit tests +os.environ["BN_DISABLE_USER_PLUGINS"] = "True" +os.environ["BN_DISABLE_USER_SETTINGS"] = "True" +os.environ["BN_DISABLE_REPOSITORY_PLUGINS"] = "True" + api_suite_path = os.path.realpath(os.path.join(os.path.dirname(os.path.realpath(__file__)), {4})) sys.path.append(api_suite_path) # support direct invocation of configuration unit.py |
