当前位置: 首页>>代码示例>>Python>>正文


Python URLParser.urlsplit方法代码示例

本文整理汇总了Python中jarn.mkrelease.urlparser.URLParser.urlsplit方法的典型用法代码示例。如果您正苦于以下问题:Python URLParser.urlsplit方法的具体用法?Python URLParser.urlsplit怎么用?Python URLParser.urlsplit使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在jarn.mkrelease.urlparser.URLParser的用法示例。


在下文中一共展示了URLParser.urlsplit方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: testSplitFile

# 需要导入模块: from jarn.mkrelease.urlparser import URLParser [as 别名]
# 或者: from jarn.mkrelease.urlparser.URLParser import urlsplit [as 别名]
 def testSplitFile(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.urlsplit('file:///var/dist/public'),
                      ('file', '', '', '/var/dist/public', '', ''))
开发者ID:Jarn,项目名称:jarn.mkrelease,代码行数:6,代码来源:test_urlparser.py

示例2: testSplitRelativeFile

# 需要导入模块: from jarn.mkrelease.urlparser import URLParser [as 别名]
# 或者: from jarn.mkrelease.urlparser.URLParser import urlsplit [as 别名]
 def testSplitRelativeFile(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.urlsplit('file:var/dist/public'),
                      ('file', '', '', 'var/dist/public', '', ''))
开发者ID:Jarn,项目名称:jarn.mkrelease,代码行数:6,代码来源:test_urlparser.py

示例3: testSplitHttp

# 需要导入模块: from jarn.mkrelease.urlparser import URLParser [as 别名]
# 或者: from jarn.mkrelease.urlparser.URLParser import urlsplit [as 别名]
 def testSplitHttp(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.urlsplit('http://jarn.com/public'),
                      ('http', '', 'jarn.com', '/public', '', ''))
开发者ID:Jarn,项目名称:jarn.mkrelease,代码行数:6,代码来源:test_urlparser.py

示例4: testSplitHttps

# 需要导入模块: from jarn.mkrelease.urlparser import URLParser [as 别名]
# 或者: from jarn.mkrelease.urlparser.URLParser import urlsplit [as 别名]
 def testSplitHttps(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.urlsplit('https://stefan:[email protected]/public'),
                      ('https', 'stefan:secret', 'jarn.com', '/public', '', ''))
开发者ID:Jarn,项目名称:jarn.mkrelease,代码行数:6,代码来源:test_urlparser.py

示例5: testSplitRsync

# 需要导入模块: from jarn.mkrelease.urlparser import URLParser [as 别名]
# 或者: from jarn.mkrelease.urlparser.URLParser import urlsplit [as 别名]
 def testSplitRsync(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.urlsplit('rsync://jarn.com/public'),
                      ('rsync', '', 'jarn.com', '/public', '', ''))
开发者ID:Jarn,项目名称:jarn.mkrelease,代码行数:6,代码来源:test_urlparser.py

示例6: testSplitSsh

# 需要导入模块: from jarn.mkrelease.urlparser import URLParser [as 别名]
# 或者: from jarn.mkrelease.urlparser.URLParser import urlsplit [as 别名]
 def testSplitSsh(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.urlsplit('ssh://[email protected]//hg/public'),
                      ('ssh', 'stefan', 'jarn.com', '//hg/public', '', ''))
开发者ID:Jarn,项目名称:jarn.mkrelease,代码行数:6,代码来源:test_urlparser.py

示例7: testSplitSvn

# 需要导入模块: from jarn.mkrelease.urlparser import URLParser [as 别名]
# 或者: from jarn.mkrelease.urlparser.URLParser import urlsplit [as 别名]
 def testSplitSvn(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.urlsplit('svn://jarn.com/public'),
                      ('svn', '', 'jarn.com', '/public', '', ''))
开发者ID:Jarn,项目名称:jarn.mkrelease,代码行数:6,代码来源:test_urlparser.py

示例8: testSplitGit

# 需要导入模块: from jarn.mkrelease.urlparser import URLParser [as 别名]
# 或者: from jarn.mkrelease.urlparser.URLParser import urlsplit [as 别名]
 def testSplitGit(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.urlsplit('git://jarn.com/public'),
                      ('git', '', 'jarn.com', '/public', '', ''))
开发者ID:Jarn,项目名称:jarn.mkrelease,代码行数:6,代码来源:test_urlparser.py

示例9: testSplitSftp

# 需要导入模块: from jarn.mkrelease.urlparser import URLParser [as 别名]
# 或者: from jarn.mkrelease.urlparser.URLParser import urlsplit [as 别名]
 def testSplitSftp(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.urlsplit('sftp://[email protected]/var/dist/public'),
                      ('sftp', 'stefan', 'jarn.com', '/var/dist/public', '', ''))
开发者ID:Jarn,项目名称:jarn.mkrelease,代码行数:6,代码来源:test_urlparser.py

示例10: testSplitBadUrl

# 需要导入模块: from jarn.mkrelease.urlparser import URLParser [as 别名]
# 或者: from jarn.mkrelease.urlparser.URLParser import urlsplit [as 别名]
 def testSplitBadUrl(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.urlsplit('ssh:[email protected]/public'),
                      ('', '', '', 'ssh:[email protected]/public', '', ''))
开发者ID:Jarn,项目名称:jarn.mkrelease,代码行数:6,代码来源:test_urlparser.py

示例11: testSplitUnsupported

# 需要导入模块: from jarn.mkrelease.urlparser import URLParser [as 别名]
# 或者: from jarn.mkrelease.urlparser.URLParser import urlsplit [as 别名]
 def testSplitUnsupported(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.urlsplit('ftp://jarn.com/public'),
                      ('ftp', '', 'jarn.com', '/public', '', ''))
开发者ID:Jarn,项目名称:jarn.mkrelease,代码行数:6,代码来源:test_urlparser.py

示例12: testSplitLocalhostWithTilde

# 需要导入模块: from jarn.mkrelease.urlparser import URLParser [as 别名]
# 或者: from jarn.mkrelease.urlparser.URLParser import urlsplit [as 别名]
 def testSplitLocalhostWithTilde(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.urlsplit('file://localhost/~stefan/public'),
                      ('file', '', 'localhost', '/~stefan/public', '', ''))
开发者ID:Jarn,项目名称:jarn.mkrelease,代码行数:6,代码来源:test_urlparser.py

示例13: testSplitRelativeFileWithTilde

# 需要导入模块: from jarn.mkrelease.urlparser import URLParser [as 别名]
# 或者: from jarn.mkrelease.urlparser.URLParser import urlsplit [as 别名]
 def testSplitRelativeFileWithTilde(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.urlsplit('file:~stefan/public'),
                      ('file', '', '', '~stefan/public', '', ''))
开发者ID:Jarn,项目名称:jarn.mkrelease,代码行数:6,代码来源:test_urlparser.py


注:本文中的jarn.mkrelease.urlparser.URLParser.urlsplit方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。