本文整理汇总了Python中jarn.mkrelease.urlparser.URLParser.is_ssh_url方法的典型用法代码示例。如果您正苦于以下问题:Python URLParser.is_ssh_url方法的具体用法?Python URLParser.is_ssh_url怎么用?Python URLParser.is_ssh_url使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jarn.mkrelease.urlparser.URLParser
的用法示例。
在下文中一共展示了URLParser.is_ssh_url方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testEmptyString
# 需要导入模块: from jarn.mkrelease.urlparser import URLParser [as 别名]
# 或者: from jarn.mkrelease.urlparser.URLParser import is_ssh_url [as 别名]
def testEmptyString(self):
urlparser = URLParser()
self.assertEqual(urlparser.is_ssh_url(''), False)
示例2: testWhitespace
# 需要导入模块: from jarn.mkrelease.urlparser import URLParser [as 别名]
# 或者: from jarn.mkrelease.urlparser.URLParser import is_ssh_url [as 别名]
def testWhitespace(self):
urlparser = URLParser()
self.assertEqual(urlparser.is_ssh_url(' [email protected]:Jarn/jarn.mkrelease'), False)
示例3: testUserOnly
# 需要导入模块: from jarn.mkrelease.urlparser import URLParser [as 别名]
# 或者: from jarn.mkrelease.urlparser.URLParser import is_ssh_url [as 别名]
def testUserOnly(self):
urlparser = URLParser()
self.assertEqual(urlparser.is_ssh_url('[email protected]:/var/dist/public'), True)
示例4: testNonConsecutive
# 需要导入模块: from jarn.mkrelease.urlparser import URLParser [as 别名]
# 或者: from jarn.mkrelease.urlparser.URLParser import is_ssh_url [as 别名]
def testNonConsecutive(self):
urlparser = URLParser()
self.assertEqual(urlparser.is_ssh_url('f o:'), False)
示例5: testBadUrl
# 需要导入模块: from jarn.mkrelease.urlparser import URLParser [as 别名]
# 或者: from jarn.mkrelease.urlparser.URLParser import is_ssh_url [as 别名]
def testBadUrl(self):
urlparser = URLParser()
self.assertEqual(urlparser.is_ssh_url('ssh'), False)
示例6: testColonOnly
# 需要导入模块: from jarn.mkrelease.urlparser import URLParser [as 别名]
# 或者: from jarn.mkrelease.urlparser.URLParser import is_ssh_url [as 别名]
def testColonOnly(self):
urlparser = URLParser()
self.assertEqual(urlparser.is_ssh_url(':'), False)
示例7: testNonAlphanumeric
# 需要导入模块: from jarn.mkrelease.urlparser import URLParser [as 别名]
# 或者: from jarn.mkrelease.urlparser.URLParser import is_ssh_url [as 别名]
def testNonAlphanumeric(self):
urlparser = URLParser()
self.assertEqual(urlparser.is_ssh_url('$&%:'), True)
示例8: testFalsePositives
# 需要导入模块: from jarn.mkrelease.urlparser import URLParser [as 别名]
# 或者: from jarn.mkrelease.urlparser.URLParser import is_ssh_url [as 别名]
def testFalsePositives(self):
# Everything with a colon matches the regex...
urlparser = URLParser()
self.assertEqual(urlparser.is_ssh_url('foo:'), True)
示例9: testSlashBeforeColon
# 需要导入模块: from jarn.mkrelease.urlparser import URLParser [as 别名]
# 或者: from jarn.mkrelease.urlparser.URLParser import is_ssh_url [as 别名]
def testSlashBeforeColon(self):
urlparser = URLParser()
self.assertEqual(urlparser.is_ssh_url('/foo:'), False)
示例10: testUnknown
# 需要导入模块: from jarn.mkrelease.urlparser import URLParser [as 别名]
# 或者: from jarn.mkrelease.urlparser.URLParser import is_ssh_url [as 别名]
def testUnknown(self):
urlparser = URLParser()
self.assertEqual(urlparser.is_ssh_url('foo://'), False)
示例11: testUnsupported
# 需要导入模块: from jarn.mkrelease.urlparser import URLParser [as 别名]
# 或者: from jarn.mkrelease.urlparser.URLParser import is_ssh_url [as 别名]
def testUnsupported(self):
urlparser = URLParser()
self.assertEqual(urlparser.is_ssh_url('ftp://'), False)
示例12: testGit
# 需要导入模块: from jarn.mkrelease.urlparser import URLParser [as 别名]
# 或者: from jarn.mkrelease.urlparser.URLParser import is_ssh_url [as 别名]
def testGit(self):
urlparser = URLParser()
self.assertEqual(urlparser.is_ssh_url('git://'), False)
示例13: testSsh
# 需要导入模块: from jarn.mkrelease.urlparser import URLParser [as 别名]
# 或者: from jarn.mkrelease.urlparser.URLParser import is_ssh_url [as 别名]
def testSsh(self):
urlparser = URLParser()
self.assertEqual(urlparser.is_ssh_url('ssh://'), False)
示例14: testGitSsh
# 需要导入模块: from jarn.mkrelease.urlparser import URLParser [as 别名]
# 或者: from jarn.mkrelease.urlparser.URLParser import is_ssh_url [as 别名]
def testGitSsh(self):
urlparser = URLParser()
self.assertEqual(urlparser.is_ssh_url('[email protected]:Jarn/jarn.mkrelease'), True)