Say I have a class
class myClass(object): pname = "" def __getName(self): return pname def __setName(self, newname): if not isalpha(newname): raise ValueError("Error") elif self.pname = newname name = property(fget=__getName,fset=__setName)
Seeing that these methods are private and I access the name pname through the name, how can I check with AssertRaises when AssertRaises only accepts the called for its test?
python unit-testing
Iacks
source share