no results returned from unittest

Asked by Erich Fiederer

Hi raiman.

My unittest framework runs completely now, but after running every .sikuli file, it doesn't return a result. Heres what my code looks like:

from sikuli import *
from xmlrunner import *
import unittest

class UnitTestX(unittest.TestCase):

 def testSfr(self):
  sfrval = runScript("./SFR_basic")
  self.assertEqual(sfrval, 1)

 ...

 def testMultichart(self):
  multichartval = runScript("./multichart_basic")
  self.assertEqual(multichartval, 1)

suite = unittest.TestLoader().loadTestsFromTestCase(UnitTestX)
result = XMLTestRunner(file("unittest.xml", "w")).run(suite)

This was my attempt after reading the unittest answer you wrote in 2013, in response to the basic testrunner not working (I think the difference is an XML output rather than console output).

Question information

Language:
English Edit question
Status:
Expired
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.