本文整理汇总了Python中BibleOrgSysGlobals.setup方法的典型用法代码示例。如果您正苦于以下问题:Python BibleOrgSysGlobals.setup方法的具体用法?Python BibleOrgSysGlobals.setup怎么用?Python BibleOrgSysGlobals.setup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BibleOrgSysGlobals
的用法示例。
在下文中一共展示了BibleOrgSysGlobals.setup方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: len
# 需要导入模块: import BibleOrgSysGlobals [as 别名]
# 或者: from BibleOrgSysGlobals import setup [as 别名]
self.assertGreater( len(something), 1 )
result4 = self.UMs.getTypicalNoteSets( 'xr' )
self.assertTrue( isinstance( result4, tuple ) )
self.assertLess( len(result4), len(result1) )
for something in result4:
self.assertTrue( isinstance( something , list ) )
self.assertTrue( something )
self.assertGreater( len(something), 1 )
result5 = self.UMs.getTypicalNoteSets( 'pq' )
self.assertEqual( result5, None )
#end of test_2200_getTypicalNoteSets
def test_2210_getMarkerListFromText( self ):
""" Test the getMarkerListFromText function. """
self.assertEqual( self.UMs.getMarkerListFromText(''), [] )
self.assertEqual( self.UMs.getMarkerListFromText('This is just plain text.'), [] )
self.assertEqual( self.UMs.getMarkerListFromText('This \\bk book\\bk* is good'), \
[('bk',5,' ','\\bk ',['bk'],1,'book'), ('bk',13,'*','\\bk*',[],None,' is good')] )
#end of test_2210_getMarkerListFromText
# end of USFMMarkersTests class
if __name__ == '__main__':
# Configure basic set-up
parser = BibleOrgSysGlobals.setup( ProgName, ProgVersion )
BibleOrgSysGlobals.addStandardOptionsAndProcess( parser )
if BibleOrgSysGlobals.verbosityLevel > 1: print( ProgNameVersion )
unittest.main() # Automatically runs all of the above tests
# end of USFMMarkersTests.py