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