本文整理匯總了Python中jarn.mkrelease.urlparser.URLParser.is_url方法的典型用法代碼示例。如果您正苦於以下問題:Python URLParser.is_url方法的具體用法?Python URLParser.is_url怎麽用?Python URLParser.is_url使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類jarn.mkrelease.urlparser.URLParser
的用法示例。
在下文中一共展示了URLParser.is_url方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: testRsyncUrl
# 需要導入模塊: from jarn.mkrelease.urlparser import URLParser [as 別名]
# 或者: from jarn.mkrelease.urlparser.URLParser import is_url [as 別名]
def testRsyncUrl(self):
urlparser = URLParser()
self.assertEqual(urlparser.is_url('rsync://'), True)
示例2: testBadUrl
# 需要導入模塊: from jarn.mkrelease.urlparser import URLParser [as 別名]
# 或者: from jarn.mkrelease.urlparser.URLParser import is_url [as 別名]
def testBadUrl(self):
urlparser = URLParser()
self.assertEqual(urlparser.is_url('ssh:'), False)
示例3: testWhitespace
# 需要導入模塊: from jarn.mkrelease.urlparser import URLParser [as 別名]
# 或者: from jarn.mkrelease.urlparser.URLParser import is_url [as 別名]
def testWhitespace(self):
urlparser = URLParser()
self.assertEqual(urlparser.is_url(' http://'), False)
示例4: testGitSshUrl
# 需要導入模塊: from jarn.mkrelease.urlparser import URLParser [as 別名]
# 或者: from jarn.mkrelease.urlparser.URLParser import is_url [as 別名]
def testGitSshUrl(self):
urlparser = URLParser()
self.assertEqual(urlparser.is_url('[email protected]:Jarn/jarn.mkrelease'), False)
示例5: testUnsupported
# 需要導入模塊: from jarn.mkrelease.urlparser import URLParser [as 別名]
# 或者: from jarn.mkrelease.urlparser.URLParser import is_url [as 別名]
def testUnsupported(self):
urlparser = URLParser()
self.assertEqual(urlparser.is_url('ftp://jarn.com/public'), True)
示例6: testFileUrl
# 需要導入模塊: from jarn.mkrelease.urlparser import URLParser [as 別名]
# 或者: from jarn.mkrelease.urlparser.URLParser import is_url [as 別名]
def testFileUrl(self):
urlparser = URLParser()
self.assertEqual(urlparser.is_url('file://'), True)
示例7: testBadScheme
# 需要導入模塊: from jarn.mkrelease.urlparser import URLParser [as 別名]
# 或者: from jarn.mkrelease.urlparser.URLParser import is_url [as 別名]
def testBadScheme(self):
urlparser = URLParser()
self.assertEqual(urlparser.is_url('ftp//'), False)
示例8: testHttps
# 需要導入模塊: from jarn.mkrelease.urlparser import URLParser [as 別名]
# 或者: from jarn.mkrelease.urlparser.URLParser import is_url [as 別名]
def testHttps(self):
urlparser = URLParser()
self.assertEqual(urlparser.is_url('https://jarn.com/public'), True)
示例9: testRelativeFile
# 需要導入模塊: from jarn.mkrelease.urlparser import URLParser [as 別名]
# 或者: from jarn.mkrelease.urlparser.URLParser import is_url [as 別名]
def testRelativeFile(self):
urlparser = URLParser()
self.assertEqual(urlparser.is_url('file:var/dist/public'), True)
示例10: testSsh
# 需要導入模塊: from jarn.mkrelease.urlparser import URLParser [as 別名]
# 或者: from jarn.mkrelease.urlparser.URLParser import is_url [as 別名]
def testSsh(self):
urlparser = URLParser()
self.assertEqual(urlparser.is_url('ssh://[email protected]//hg/public'), True)
示例11: testGitUrl
# 需要導入模塊: from jarn.mkrelease.urlparser import URLParser [as 別名]
# 或者: from jarn.mkrelease.urlparser.URLParser import is_url [as 別名]
def testGitUrl(self):
urlparser = URLParser()
self.assertEqual(urlparser.is_url('git://'), True)
示例12: testRsync
# 需要導入模塊: from jarn.mkrelease.urlparser import URLParser [as 別名]
# 或者: from jarn.mkrelease.urlparser.URLParser import is_url [as 別名]
def testRsync(self):
urlparser = URLParser()
self.assertEqual(urlparser.is_url('rsync://jarn.com/public'), True)
示例13: testGit
# 需要導入模塊: from jarn.mkrelease.urlparser import URLParser [as 別名]
# 或者: from jarn.mkrelease.urlparser.URLParser import is_url [as 別名]
def testGit(self):
urlparser = URLParser()
self.assertEqual(urlparser.is_url('git://jarn.com/public'), True)
示例14: testSvn
# 需要導入模塊: from jarn.mkrelease.urlparser import URLParser [as 別名]
# 或者: from jarn.mkrelease.urlparser.URLParser import is_url [as 別名]
def testSvn(self):
urlparser = URLParser()
self.assertEqual(urlparser.is_url('svn://jarn.com/public'), True)
示例15: testSshUrl
# 需要導入模塊: from jarn.mkrelease.urlparser import URLParser [as 別名]
# 或者: from jarn.mkrelease.urlparser.URLParser import is_url [as 別名]
def testSshUrl(self):
urlparser = URLParser()
self.assertEqual(urlparser.is_url('ssh://'), True)