本文整理汇总了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)