NameError (!! WHILE IMPORTING!!)
Hi,
Using Sikuli IDE 1.1.0-Beta1.
Trying to execute tests using the HTMLTestRunner reporter and getting the following error on line <<from POSTests import *>> in main.sikuli
[error] script [ main ] stopped with error in line 9
[error] NameError ( !!WHILE IMPORTING!! name 'sys' is not defined )
# script named POSTests.sikuli
=======
importPath = r"C:\SikuliScri
if not importPath in sys.path: sys.path.
from sikuli import *
import unittest
import UtilityFunctions
class LiqPOS(
def test_Sale1(self):
print "SALE 01"
def test_Sale2(self):
print "SALE 02"
def test_Sale3(self):
print "Sale 03"
# script named main.sikuli
=======
from sikuli import *
import unittest
# import path for HTMLTestRunner
importPath = r"C:\SikuliScri
if not importPath in sys.path: sys.path.
import HTMLTestRunner
from POSTests import *
# path to report folder
dir = "C:\\SikuliRepo
import os
fp = file(os.
suite = unittest.
runner = HTMLTestRunner.
runner.run(suite)
fp.close()
If i move the code from main.sikuli to the POSTests.sikuli, it works fine. It must be to do with the way I'm importing, both scripts are in the same directory. Any help is appreciated.
Thanks.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Tak Eda
- Solved:
- Last query:
- Last reply: