sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #50180
[Question #677960]: TypeError: 'NoneType' object is not callable - from HTML test runner
New question #677960 on Sikuli:
https://answers.launchpad.net/sikuli/+question/677960
Hello, i am using Sikuli,unittest and HTMLTestRunner . I have a CSV file that looks like this for example:
startApp,createNewProject
startApp,createNewProject,createDiagram
For each line in the CSV I'm creating a test. The code is this:
def TestSuiteFactory():
suite = unittest.TestSuite()
pathCSV = r'pathToCsv\testCSV.csv'
with open(pathCSV, 'rb') as csvfile:
sequenceInnerMethods = dict()
reader = csv.reader(csvfile)
for row in reader:
for item in row:
try:
sequenceInnerMethods[item] = getattr(HagercadSteps.Steps, item)()
#getattr(HagercadSteps.Steps, item)()
except AttributeError:
print("Unknown attribute", item, "ignored")
sequenceTestSuite = __builtin__.type(row[-1], (unittest.TestCase,), sequenceInnerMethods)
suite.addTest(sequenceTestSuite(item))
#HagercadSteps.Steps.stopApp()
return suite
So here there 2 tests that will be built and run with the help of this method. The problem is that inside the html test report, for each test i get this error:
TypeError: 'NoneType' object is not callable
I couldn't find proper solutions for this. Anyone has an idea?
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.