diff options
Diffstat (limited to 'testsuite/Testsrc/test_code_checks.py')
-rw-r--r-- | testsuite/Testsrc/test_code_checks.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/testsuite/Testsrc/test_code_checks.py b/testsuite/Testsrc/test_code_checks.py index 58785028d..d4a82eab4 100644 --- a/testsuite/Testsrc/test_code_checks.py +++ b/testsuite/Testsrc/test_code_checks.py @@ -24,6 +24,14 @@ except ImportError: # path to Bcfg2 src directory srcpath = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "src")) +# we set this in the environment rather than with sys.path because we +# call pylint, an external command, later, and it needs the modified +# environment +if 'PYTHONPATH' in os.environ: + os.environ['PYTHONPATH'] = os.environ['PYTHONPATH'] + ":" + \ + os.path.join(srcpath, "lib") +else: + os.environ['PYTHONPATH'] = os.path.join(srcpath, "lib") # path to pylint rc file rcfile = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", |