sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #32598
[Question #267479]: Pyunit setup doesn't fail, but runs 0 tests and then OK
New question #267479 on Sikuli:
https://answers.launchpad.net/sikuli/+question/267479
Hello Raiman!
I followed your suggestion, and started using runScript() for my testing setup. It does not crash, however it appears nothing is tested. Here is my main test file:
from sikuli import *
import unittest
class UnitTestX(unittest.TestCase):
def batchview(self):
batchviewval = runScript(Batchview_basic)
self.assertEqual(batchviewval, 1)
def blemish(self):
blemishval = runScript(blemish_basic)
self.assertEqual(blemishval, 1)
def colorcheck(self):
colorcheckval = runScript(colorcheck_basic)
self.assertEqual(colorcheckval, 1)
#def distortion(self):
#distortionval = runScript(distortion_basic)
# self.assertEqual(distortionval, 1)
def dotPattern(self):
dotpatternval = runScript(dotpattern_basic)
self.assertEqual(dotpatternval, 1)
def esfrIsoAuto(self):
esfrisoval = runScript(esfrisoauto_basic)
self.assertEqual(esfrisoval, 1)
def logFContrast(self):
logFval = runScript(LogF_basic)
self.assertEqual(logFval, 1)
#def multichart(self):
# self.assertEqual(sikuli.multichart_basic(), 1)
def multitest(self):
multitestval = runScript(multitest_basic)
self.assertEqual(multitestval, 1)
def randomDeadLeaves(self):
randomval = runScript(Random_test_basic)
self.assertEqual(randomval, 1)
#def rescharts(self):
# self.assertEqual(sikuli.reschart_simple_SFR(), 1)
def sfr(self):
sfrval = runScript(SFR_basic)
self.assertEqual(sfrval, 1)
def sfrPlusAuto(self):
sfrplusval = runScript(sfrplusauto_basic)
self.assertEqual(sfrplusval, 1)
def star(self):
starval = runScript(star_basic)
self.assertEqual(starval, 1)
def stepchart(self):
stepchartval = runScript(stepchart_basic)
self.assertEqual(stepchartval, 1)
def uniformity(self):
uniformityval = runScript(uniformity_basic)
self.assertEqual(uniformityval, 1)
def wedge(self):
wedgeval = runScript(wedge_basic)
self.assertEqual(wedgeval, 1)
suite = unittest.TestLoader().loadTestsFromTestCase(UnitTestX)
unittest.TextTestRunner(verbosity=2).run(suite)
Here is an example of one of the individual scripts it is running in each def:
from sikuli import *
click("1431123550795.png")
click("Screen Shot 2015-04-28 at 11.50.04 AM.png")
click("1418422585290.png")
click("1418422597111.png")
wait(3)
click("1418422611695.png")
wait(5)
click("1418422621054.png")
exit(1)
I run the main test, and it returns:
----------------------------------------------------------------------
Ran 0 tests in 0.001s
OK
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.