本文整理匯總了Python中twisted.python.versions.Version._parseSVNEntries方法的典型用法代碼示例。如果您正苦於以下問題:Python Version._parseSVNEntries方法的具體用法?Python Version._parseSVNEntries怎麽用?Python Version._parseSVNEntries使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類twisted.python.versions.Version
的用法示例。
在下文中一共展示了Version._parseSVNEntries方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_parseBrokenSVNEntries
# 需要導入模塊: from twisted.python.versions import Version [as 別名]
# 或者: from twisted.python.versions.Version import _parseSVNEntries [as 別名]
def test_parseBrokenSVNEntries(self):
"""
If there is a broken SVN entries file, it should return an SVN
revision of "Unknown".
"""
version = Version("dummy", 1, 0, 0)
self.assertEquals(version._parseSVNEntries(StringIO('I like puppies')),
"Unknown")
示例2: test_goodSVNEntries
# 需要導入模塊: from twisted.python.versions import Version [as 別名]
# 或者: from twisted.python.versions.Version import _parseSVNEntries [as 別名]
def test_goodSVNEntries(self):
"""
Version should be able to parse an SVN entries file.
"""
version = Version("dummy", 1, 0, 0)
crap = '''<?xml version="1.0" encoding="utf-8"?>
<wc-entries
xmlns="svn:">
<entry
committed-rev="18210"
name=""
committed-date="2006-09-21T04:43:09.542953Z"
url="svn+ssh://svn.twistedmatrix.com/svn/Twisted/trunk/twisted"
last-author="exarkun"
kind="dir"
uuid="bbbe8e31-12d6-0310-92fd-ac37d47ddeeb"
repos="svn+ssh://svn.twistedmatrix.com/svn/Twisted"
revision="18211"/>
</wc-entries>
'''
self.assertEquals(version._parseSVNEntries(StringIO(crap)), '18211')