def ttestusingSingleton(self): import prgcode c=prgcode.derivedmyobj() aMyClass=prgcode.MyClass() otheraMyClass=prgcode.MyClass() self.assertEqual(c.name(),"myobj") self.assertEqual(c.derivedname(),"derivedmyobj") self.assertEqual(aMyClass, otheraMyClass) self.assertEqual(get_address(aMyClass),get_address(otheraMyClass))
def testusingDerivedclass(self): import prgcode c=prgcode.derivedmyobj() self.assertEqual(c.name(),"myobj") self.assertEqual(c.derivedname(),"derivedmyobj")