* fix args for setAttributeNode
This commit is contained in:
+1
-1
@@ -242,7 +242,7 @@ class autoxml(type):
|
|||||||
attr.value = text
|
attr.value = text
|
||||||
anonfuns = cls.gen_anon_basic(attr, spec, readtext, createnode, writetext)
|
anonfuns = cls.gen_anon_basic(attr, spec, readtext, createnode, writetext)
|
||||||
def mergetext(node, attr):
|
def mergetext(node, attr):
|
||||||
node.setAttributeNode(node, attr)
|
node.setAttributeNode(attr)
|
||||||
return cls.gen_named_comp(attr, spec, anonfuns, mergetext)
|
return cls.gen_named_comp(attr, spec, anonfuns, mergetext)
|
||||||
|
|
||||||
def gen_tag_member(cls, tag):
|
def gen_tag_member(cls, tag):
|
||||||
|
|||||||
@@ -40,8 +40,8 @@ class XmlFileTestCase(unittest.TestCase):
|
|||||||
t_Number = [types.IntType, xmlfile.optional]
|
t_Number = [types.IntType, xmlfile.optional]
|
||||||
t_Email = [types.StringType, xmlfile.optional]
|
t_Email = [types.StringType, xmlfile.optional]
|
||||||
a_href = [types.StringType, xmlfile.mandatory]
|
a_href = [types.StringType, xmlfile.mandatory]
|
||||||
t_Projects = [ [types.StringType], xmlfile.mandatory, 'Project']
|
#t_Projects = [ [types.StringType], xmlfile.mandatory, 'Project']
|
||||||
t_OtherInfo = [ OtherInfo, xmlfile.optional ]
|
#t_OtherInfo = [ OtherInfo, xmlfile.optional ]
|
||||||
|
|
||||||
a = A()
|
a = A()
|
||||||
self.assertEqual(a.href, None)
|
self.assertEqual(a.href, None)
|
||||||
|
|||||||
Reference in New Issue
Block a user