def testMakeSet(self): """ Testcase for the makeset method of the WMObject Class """ dummyWMObject = WMObject() #First case: Argument is already a Set s = set('1,2,3') assert dummyWMObject.makeset(s) == s, \ 'method makeset return value doesn\'t match ' \ '- list argument test' #Second case: Argument is not a list b = [1, 2, 3] assert dummyWMObject.makeset(b) == set(b), \ 'method makeset return value doesn\'t match ' \ '- common argument test'
def testMakeList(self): """ Testcase for the makelist method of the WMObject Class """ dummyWMObject = WMObject() #First case: Argument is already a list l = [1, 2, 3] assert dummyWMObject.makelist(l) == l, \ 'method makelist return value doesn\'t match ' \ '- list argument test' #Second case: Argument is not a list a = 'test' assert dummyWMObject.makelist(a) == [a], \ 'method makelist return value doesn\'t match ' \ '- common argument test'