本文整理汇总了Python中document.documentFields.DocumentFields.getDocType方法的典型用法代码示例。如果您正苦于以下问题:Python DocumentFields.getDocType方法的具体用法?Python DocumentFields.getDocType怎么用?Python DocumentFields.getDocType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类document.documentFields.DocumentFields
的用法示例。
在下文中一共展示了DocumentFields.getDocType方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setType
# 需要导入模块: from document.documentFields import DocumentFields [as 别名]
# 或者: from document.documentFields.DocumentFields import getDocType [as 别名]
def setType(self):
a = DocumentFields()
for t in DocumentFields.TYPES:
a.setDocType(t)
assert (a.getDocType() == t)
a.setDocType(DocumentFields.OTHER)
assert (a.getDocType() == DocumentFields.OTHER)
示例2: test_setType
# 需要导入模块: from document.documentFields import DocumentFields [as 别名]
# 或者: from document.documentFields.DocumentFields import getDocType [as 别名]
def test_setType(self):
a = DocumentFields()
for t in DocumentFields.TYPES:
a.setDocType(t)
self.assertEqual(a.getDocType(), t)
a.setDocType(DocumentFields.DOC_UNKNOWN)
self.assertEqual(a.getDocType(), DocumentFields.DOC_UNKNOWN)
示例3: createEmpty
# 需要导入模块: from document.documentFields import DocumentFields [as 别名]
# 或者: from document.documentFields.DocumentFields import getDocType [as 别名]
def createEmpty(self):
a = DocumentFields()
assert (a.getNbFields() == 0)
assert (a.getDocType() == DocumentFields.OTHER)
示例4: test_createEmpty
# 需要导入模块: from document.documentFields import DocumentFields [as 别名]
# 或者: from document.documentFields.DocumentFields import getDocType [as 别名]
def test_createEmpty(self):
a = DocumentFields()
assert (a.getNbFields() == 0)
assert (a.getDocType() == DocumentFields.DOC_UNKNOWN)