← Back to team overview

sikuli-driver team mailing list archive

[Question #689581]: assert(function name)

 

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

In my function module having a function,

def Enable(obj1,obj2):
    m=findBest(obj1,obj2)
    m.getIndex(),m.getScore()
    
    print(m.getIndex(),m.getScore())
    if m.getIndex()==0:        
        print("Button is Enabled")        
    else:
        print("Button is not enabled.")
In another module where class is defined I am importing this module and asserting the functions

import function module name
class Test(unittest.TestCase):
        def test01():
              assert(Enable(obj1,obj2))

The assert always resulting as failed eventhough it is supposed to be passed.

Please note that for the functions using if exists(image) , assert is working as expected. 





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