def testException (self): scym1 = trac26.tCardCymru('un') instance = None with self.assertRaises(pyxb.AbstractInstantiationError) as cm: instance = trac26.eAbstract(scym1) e = cm.exception self.assertTrue(instance is None) self.assertEqual(str(e), 'Cannot instantiate abstract type tAbstract directly')
def testException(self): scym1 = trac26.tCardCymru('un') instance = None with self.assertRaises(pyxb.AbstractInstantiationError) as cm: instance = trac26.eAbstract(scym1) e = cm.exception self.assertTrue(instance is None) self.assertEqual( str(e), 'Cannot instantiate abstract type tAbstract directly')
def testDisplayException(self): if DisplayException: scym1 = trac26.tCardCymru('un') trac26.eAbstract(scym1)
def testDisplayException (self): if DisplayException: scym1 = trac26.tCardCymru('un') trac26.eAbstract(scym1)