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


Python URLParser.to_ssh_url方法代码示例

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


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

示例1: testEmptyString

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

示例2: testUserOnly

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

示例3: testWhitespace

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

示例4: testNoPath

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

示例5: testNoUser

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

示例6: testNoHost

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

示例7: testNoUrl

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

示例8: testBadUrl

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

示例9: testIdempotence

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

示例10: testSftp

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


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