* fix args for setAttributeNode

This commit is contained in:
Eray Özkural
2005-09-24 17:18:01 +00:00
parent 90ed05e1bb
commit 39510d3676
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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):
+2 -2
View File
@@ -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)