本文整理汇总了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', '', ''))
示例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', '', ''))
示例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', '', ''))
示例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', '', ''))
示例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', '', ''))
示例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', '', ''))
示例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', '', ''))
示例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', '', ''))
示例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', '', ''))
示例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', '', ''))
示例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', '', ''))
示例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', '', ''))