本文整理汇总了Python中jarn.mkrelease.urlparser.URLParser.abspath方法的典型用法代码示例。如果您正苦于以下问题:Python URLParser.abspath方法的具体用法?Python URLParser.abspath怎么用?Python URLParser.abspath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jarn.mkrelease.urlparser.URLParser
的用法示例。
在下文中一共展示了URLParser.abspath方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testNonFile
# 需要导入模块: from jarn.mkrelease.urlparser import URLParser [as 别名]
# 或者: from jarn.mkrelease.urlparser.URLParser import abspath [as 别名]
def testNonFile(self):
urlparser = URLParser()
self.assertEqual(urlparser.abspath('svn://jarn.com/public'),
'svn://jarn.com/public')
示例2: testLocalhost
# 需要导入模块: from jarn.mkrelease.urlparser import URLParser [as 别名]
# 或者: from jarn.mkrelease.urlparser.URLParser import abspath [as 别名]
def testLocalhost(self):
urlparser = URLParser()
cwd = os.getcwd()
self.assertEqual(urlparser.abspath('file://localhost%s/var/dist/public' % cwd),
'file://localhost%s/var/dist/public' % cwd)
示例3: testLocalhostExpandUser
# 需要导入模块: from jarn.mkrelease.urlparser import URLParser [as 别名]
# 或者: from jarn.mkrelease.urlparser.URLParser import abspath [as 别名]
def testLocalhostExpandUser(self):
urlparser = URLParser()
logname = os.environ.get('LOGNAME')
home = os.environ.get('HOME')
self.assertEqual(urlparser.abspath('file://localhost/~%s/public' % logname),
'file://localhost%s/public' % home)
示例4: testRelativeFile
# 需要导入模块: from jarn.mkrelease.urlparser import URLParser [as 别名]
# 或者: from jarn.mkrelease.urlparser.URLParser import abspath [as 别名]
def testRelativeFile(self):
urlparser = URLParser()
cwd = os.getcwd()
self.assertEqual(urlparser.abspath('file:var/dist/public'),
'file://%s/var/dist/public' % cwd)