getBundlePath returns None when running unit tests from the command line
I have been working with the Sikuli unit test framework successfully using by adding specific paths (e.g. "c:\scripts") to sys.path for module imports but using the built in function getBundlePath() would be far more convenient. However when I use getBundlePath() in a .sikuli and launch it from the command line it returns None instead of the package directory.
Example:
path = getBundlePath()
def setUp(self):
print "setup run"
def tearDown(self):
print "tearDown run"
def testSomething(
print self.path
Prints the path to the .sikuli when I use the run button in the Sikuli IDE but using SIkuli-IDE.bat from the command line I get the following result:
[info] Sikuli vision engine loaded.
[info] Windows utilities loaded.
[info] VDictProxy loaded.
.setup run
None
tearDown run
Time: 0.003
OK (1 test)
Am I missing a step to use this function in this case?
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Matthew Balvanz for more information if necessary.