Esempio n. 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)
Esempio n. 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)
Esempio n. 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))
Esempio n. 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))
Esempio n. 5
0
 def testSchemaSupport (self):
     instance = trac26.eEmpty()
     cym1 = trac26.tConcSubCymru('un')
     instance = trac26.eUseAbstract(cym1)
Esempio n. 6
0
 def testSchemaSupport(self):
     instance = trac26.eEmpty()
     cym1 = trac26.tConcSubCymru('un')
     instance = trac26.eUseAbstract(cym1)