Example #1
0
 def testComplexException (self):
     value = None
     instance = trac26.eUseAbstract(trac26.tConcSubCymru('un'))
     with self.assertRaises(pyxb.NotSimpleContentError) as cm:
         value = instance.value()
     e = cm.exception
     self.assertEqual(e.instance, instance)
Example #2
0
 def testComplexException(self):
     value = None
     instance = trac26.eUseAbstract(trac26.tConcSubCymru('un'))
     with self.assertRaises(pyxb.NotSimpleContentError) as cm:
         value = instance.value()
     e = cm.exception
     self.assertEqual(e.instance, instance)
Example #3
0
 def testSchemaSupport(self):
     cym1 = trac26.tConcSubCymru('un')
     eng3 = trac26.tConcSubEnglish('three')
     # Direct generation works
     instance = trac26.eUseAbstract(cym1)
     # So does from documents with xsi:type
     i2 = trac26.CreateFromDocument(self.Good_xmlt)
     self.assertTrue(isinstance(i2.eAbstract, trac26.tConcSubCymru))
Example #4
0
 def testSchemaSupport (self):
     cym1 = trac26.tConcSubCymru('un')
     eng3 = trac26.tConcSubEnglish('three')
     # Direct generation works
     instance = trac26.eUseAbstract(cym1)
     # So does from documents with xsi:type
     i2 = trac26.CreateFromDocument(self.Good_xmlt)
     self.assertTrue(isinstance(i2.eAbstract, trac26.tConcSubCymru))
Example #5
0
 def testSchemaSupport (self):
     instance = trac26.eEmpty()
     cym1 = trac26.tConcSubCymru('un')
     instance = trac26.eUseAbstract(cym1)
Example #6
0
 def testSchemaSupport(self):
     instance = trac26.eEmpty()
     cym1 = trac26.tConcSubCymru('un')
     instance = trac26.eUseAbstract(cym1)