How to reaload module which has been imported by a string
Hi all,
In my testing environment, I want to load modules of test cases at runtime from a list defined in a setupEnvironment.py file
Here is the code in the main script to load modules:
import setupEnvironment #it is from setupEnvironment.py file
reload(
TestCaseList = setupEnvironmen
TestCaseDir = setupEnvironmen
ParentPath = getParentPath()
test_id = 0
for test_name in TestCaseList:
testmodule_path = getParentPath() + "\\" + TestCaseDir[
testmodule_name = TestCaseDir[
if testmodule_path not in sys.path:
test = __import_
### how to reload the the test case here ???? ########
test.
test_id += 1
I want to know which command I can use to make Sikuli reload the test module when it runs?
Since I may be making changes to the test modules and run the main script many times. Now each time, I need to restart the IDE to make it reloads.
Note: This case, I load the module by using a string defined in "testmodule_name" variable.
I tried with "reload(
Thanks,
HuyK
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- HuyNguyen
- Solved:
- Last query:
- Last reply: