← Back to team overview

sikuli-driver team mailing list archive

[Question #150217]: getBundlePath returns None when running unit tests from the command line

 

New question #150217 on Sikuli:
https://answers.launchpad.net/sikuli/+question/150217

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(self):
	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?

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.