autoxmltests.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:pisi 作者: examachine 项目源码 文件源码
def setUp(self):

        class OtherInfo:
            __metaclass__ = autoxml.autoxml
            t_BirthDate = [types.StringType, autoxml.mandatory]
            t_Interest = [types.StringType, autoxml.optional]
            t_CodesWith = [ [types.UnicodeType], autoxml.optional, 'CodesWith/Person']

        class A(xmlfile.XmlFile):
            __metaclass__ = autoxml.autoxml
            t_Name = [types.UnicodeType, autoxml.mandatory]
            t_Description = [autoxml.LocalText, autoxml.mandatory]
            t_Number = [types.IntType, autoxml.optional]
            t_Email = [types.StringType, autoxml.optional]
            a_href = [types.StringType, autoxml.mandatory]
            t_Projects = [ [types.StringType], autoxml.mandatory, 'Project']
            t_OtherInfo = [ OtherInfo, autoxml.optional ]
            s_Comment = [ autoxml.Text, autoxml.mandatory]

        self.A = A
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号