← Back to team overview

sikuli-driver team mailing list archive

[Question #191858]: I am getting this error 'module' object has no attribute 'TestCase'

 

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

 This script runs perfectly when run inside the Sikuli IDE  as a Unit Test.
 When I run it from a bat file I get this error 'module' object has no attribute 'TestCase'.

this is my bat file 
Sikuli-IDE.bat -r  C:\sikuli\Sikuli-r930-win32\Sikuli-IDE\src\idirUnit.sikuli

=====
script 
=====

from sikuli import *
import unittest

 ##   ... define your tests ...

class TestSequenceFunctions(unittest.TestCase):


	def setUp(self):
	 print "in setup"
	 popup("in setup")
	 

	def tearDown(self):
	 print "in tearDown"
	 popup("in teardown")

	def test_aaa_empty(self):
		print "in test"
		popup("in test_empty")
		return True
 
		
		
#########   end test defs #####################		
suite = unittest.TestLoader().loadTestsFromTestCase(TestSequenceFunctions)
unittest.TextTestRunner(verbosity=2).run(suite)

======

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