Esempio n. 1
0
    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))
Esempio n. 2
0
    def testusingDerivedclass(self):
	import prgcode 
	c=prgcode.derivedmyobj()	
	self.assertEqual(c.name(),"myobj")
	self.assertEqual(c.derivedname(),"derivedmyobj")