11-06-2019 10:08 AM
I am using Python 3.6 and teststand 2016 and having some issues with importing modules. I am getting "Unable to import the specified module due to the following error" found in the Configure Python Step in the Python Module Options.
Example folder structure:
/projects/modules/somemodule.py
/projects/tests/runthisunittest.py
Example Code of runthisunittest.py:
from modules.somemodule import somemodule
.
.
some code to run tests using somemodule class....
Question:
Is it possible to run this code above? How would I need to restructure my code?
Solved! Go to Solution.
11-07-2019 08:48 PM
Option 1:
Copy your /project/modules directory under /projects/tests.
Basically, 'modules' directory and 'runthisunitest.py' file should be in same directory.
Option 2:
To you PATH environment variable, add absolute path for /projects/modules
-Shashidhar
11-11-2019 08:52 AM
Thank you for your reply. Option 1 works for me.