From 090ce2040e1f4ae33962d49347ca8a8a9e87eea4 Mon Sep 17 00:00:00 2001 From: Noel Eck Date: Thu, 15 Mar 2018 11:10:00 -0700 Subject: [PATCH] ctest: Add module path to sys path Updated the pythonloader test module to always append the module's path to the system path. Signed-off-by: Noel Eck --- tests/check_pythonload.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/check_pythonload.py b/tests/check_pythonload.py index 8b064e42..2ae72ae6 100755 --- a/tests/check_pythonload.py +++ b/tests/check_pythonload.py @@ -51,6 +51,9 @@ class loadModule(unittest.TestCase): print('Skipping blacklisted %s ...' % pyfile) continue + # Append the path of this python module + sys.path.append(os.path.dirname(pyfile)) + try: pyfile = imp.load_source(module, pyfile) except Exception as x: