Example #1
0
 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')
Example #2
0
 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')
Example #3
0
 def testDisplayException(self):
     if DisplayException:
         scym1 = trac26.tCardCymru('un')
         trac26.eAbstract(scym1)
Example #4
0
 def testDisplayException (self):
     if DisplayException:
         scym1 = trac26.tCardCymru('un')
         trac26.eAbstract(scym1)