Example #1
0
 def testException (self):
     instance = None
     with self.assertRaises(pyxb.AbstractElementError) as cm:
         instance = trac26.eAbstractCard('un')
     e = cm.exception
     self.assertTrue(instance is None)
     self.assertEqual(e.element, trac26.eAbstractCard)
     self.assertEqual(e.value, ('un',))
     self.assertEqual(str(e), 'Cannot instantiate abstract element eAbstractCard directly')
Example #2
0
 def testException(self):
     instance = None
     with self.assertRaises(pyxb.AbstractElementError) as cm:
         instance = trac26.eAbstractCard('un')
     e = cm.exception
     self.assertTrue(instance is None)
     self.assertEqual(e.element, trac26.eAbstractCard)
     self.assertEqual(e.value, ('un', ))
     self.assertEqual(
         str(e),
         'Cannot instantiate abstract element eAbstractCard directly')
Example #3
0
 def testDisplayException(self):
     if DisplayException:
         trac26.eAbstractCard('un')
Example #4
0
 def testDisplayException (self):
     if DisplayException:
         trac26.eAbstractCard('un')