本文整理匯總了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)