當前位置: 首頁>>代碼示例>>Python>>正文


Python URLParser.split方法代碼示例

本文整理匯總了Python中jarn.mkrelease.urlparser.URLParser.split方法的典型用法代碼示例。如果您正苦於以下問題:Python URLParser.split方法的具體用法?Python URLParser.split怎麽用?Python URLParser.split使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在jarn.mkrelease.urlparser.URLParser的用法示例。


在下文中一共展示了URLParser.split方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: testSplitBadUrl

# 需要導入模塊: from jarn.mkrelease.urlparser import URLParser [as 別名]
# 或者: from jarn.mkrelease.urlparser.URLParser import split [as 別名]
 def testSplitBadUrl(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.split('ssh:[email protected]/public'),
                      ('', '', '', 'ssh:[email protected]/public', '', ''))
開發者ID:,項目名稱:,代碼行數:6,代碼來源:

示例2: testSplitGitWithTilde

# 需要導入模塊: from jarn.mkrelease.urlparser import URLParser [as 別名]
# 或者: from jarn.mkrelease.urlparser.URLParser import split [as 別名]
 def testSplitGitWithTilde(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.split('git://jarn.com/~stefan/public'),
                      ('git', '', 'jarn.com', '/~stefan/public', '', ''))
開發者ID:,項目名稱:,代碼行數:6,代碼來源:

示例3: testSplitUnsupported

# 需要導入模塊: from jarn.mkrelease.urlparser import URLParser [as 別名]
# 或者: from jarn.mkrelease.urlparser.URLParser import split [as 別名]
 def testSplitUnsupported(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.split('ftp://jarn.com/public'),
                      ('ftp', '', 'jarn.com', '/public', '', ''))
開發者ID:,項目名稱:,代碼行數:6,代碼來源:

示例4: testSplitRelativeFileWithTilde

# 需要導入模塊: from jarn.mkrelease.urlparser import URLParser [as 別名]
# 或者: from jarn.mkrelease.urlparser.URLParser import split [as 別名]
 def testSplitRelativeFileWithTilde(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.split('file:~stefan/public'),
                      ('file', '', '', '~stefan/public', '', ''))
開發者ID:,項目名稱:,代碼行數:6,代碼來源:

示例5: testSplitLocalhostWithTilde

# 需要導入模塊: from jarn.mkrelease.urlparser import URLParser [as 別名]
# 或者: from jarn.mkrelease.urlparser.URLParser import split [as 別名]
 def testSplitLocalhostWithTilde(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.split('file://localhost/~stefan/public'),
                      ('file', '', 'localhost', '/~stefan/public', '', ''))
開發者ID:,項目名稱:,代碼行數:6,代碼來源:

示例6: testSplitFile

# 需要導入模塊: from jarn.mkrelease.urlparser import URLParser [as 別名]
# 或者: from jarn.mkrelease.urlparser.URLParser import split [as 別名]
 def testSplitFile(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.split('file:///var/dist/public'),
                      ('file', '', '', '/var/dist/public', '', ''))
開發者ID:,項目名稱:,代碼行數:6,代碼來源:

示例7: testSplitRelativeFile

# 需要導入模塊: from jarn.mkrelease.urlparser import URLParser [as 別名]
# 或者: from jarn.mkrelease.urlparser.URLParser import split [as 別名]
 def testSplitRelativeFile(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.split('file:var/dist/public'),
                      ('file', '', '', 'var/dist/public', '', ''))
開發者ID:,項目名稱:,代碼行數:6,代碼來源:

示例8: testSplitHttps

# 需要導入模塊: from jarn.mkrelease.urlparser import URLParser [as 別名]
# 或者: from jarn.mkrelease.urlparser.URLParser import split [as 別名]
 def testSplitHttps(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.split('https://stefan:[email protected]/public'),
                      ('https', 'stefan:secret', 'jarn.com', '/public', '', ''))
開發者ID:,項目名稱:,代碼行數:6,代碼來源:

示例9: testSplitHttp

# 需要導入模塊: from jarn.mkrelease.urlparser import URLParser [as 別名]
# 或者: from jarn.mkrelease.urlparser.URLParser import split [as 別名]
 def testSplitHttp(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.split('http://jarn.com/public'),
                      ('http', '', 'jarn.com', '/public', '', ''))
開發者ID:,項目名稱:,代碼行數:6,代碼來源:

示例10: testSplitSsh

# 需要導入模塊: from jarn.mkrelease.urlparser import URLParser [as 別名]
# 或者: from jarn.mkrelease.urlparser.URLParser import split [as 別名]
 def testSplitSsh(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.split('ssh://[email protected]//hg/public'),
                      ('ssh', 'stefan', 'jarn.com', '//hg/public', '', ''))
開發者ID:,項目名稱:,代碼行數:6,代碼來源:

示例11: testSplitRsync

# 需要導入模塊: from jarn.mkrelease.urlparser import URLParser [as 別名]
# 或者: from jarn.mkrelease.urlparser.URLParser import split [as 別名]
 def testSplitRsync(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.split('rsync://jarn.com/public'),
                      ('rsync', '', 'jarn.com', '/public', '', ''))
開發者ID:,項目名稱:,代碼行數:6,代碼來源:

示例12: testSplitSvn

# 需要導入模塊: from jarn.mkrelease.urlparser import URLParser [as 別名]
# 或者: from jarn.mkrelease.urlparser.URLParser import split [as 別名]
 def testSplitSvn(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.split('svn://jarn.com/public'),
                      ('svn', '', 'jarn.com', '/public', '', ''))
開發者ID:,項目名稱:,代碼行數:6,代碼來源:


注:本文中的jarn.mkrelease.urlparser.URLParser.split方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。