← Back to team overview

sikuli-driver team mailing list archive

[Question #623013]: AttributeError ( 'module' object has no attribute 'test_TC1' )

 

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

#I have a "ScriptA" whose methods are being called from "MainScript". But I am getting below error in console:

#[error] AttributeError ( 'module' object has no attribute 'test_TC1' )

#Any help would be highly appreciated.

################################################################################################################

#ScriptA.sikuli

#################################################################################################################

from sikuli import*
import unittest

Class A(unittest.TestCase):
    
    def test_TC1(self):
        ##Some Code


################################################################################################################

#MainScript.sikuli

################################################################################################################

from sikuli import *
import ScriptA
reload(ScriptA)
from ScriptA import *
import unittest
import HTMLTestRunner

def main():
    ScriptA.test_TC1()
    suite = unittest.TestLoader().loadTestsFromTestCase(A)
    outfile = open("C:\Sikuli Reports\A.html", "wb")
    runner = HTMLTestRunner.HTMLTestRunner(stream=outfile, title='A Test Report', description='This is a Test Report' )
    runner.run(suite)
    outfile.close()

if __name__ == '__main__':
    main()



-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.