本文整理汇总了Python中admit.AT.AT.baseDir方法的典型用法代码示例。如果您正苦于以下问题:Python AT.baseDir方法的具体用法?Python AT.baseDir怎么用?Python AT.baseDir使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类admit.AT.AT
的用法示例。
在下文中一共展示了AT.baseDir方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_baseDir
# 需要导入模块: from admit.AT import AT [as 别名]
# 或者: from admit.AT.AT import baseDir [as 别名]
def test_baseDir(self):
at = AT({'alias': 'g'})
basedir = at.baseDir("/tmp/")
if(self.verbose):
print "\nAT Class base directory", basedir
self.assertEqual(basedir, "/tmp/")
示例2: test_AT_baseDir
# 需要导入模块: from admit.AT import AT [as 别名]
# 或者: from admit.AT.AT import baseDir [as 别名]
def test_AT_baseDir(self):
""" test AT baseDir(), dir() """
at = AT({'alias': 'g'})
basedir = at.baseDir("/tmp/")
self.assertEqual(basedir, "/tmp/")
fullpath = at.dir("test.test")
self.assertEqual(fullpath, "/tmp/test.test")
示例3: test_dir
# 需要导入模块: from admit.AT import AT [as 别名]
# 或者: from admit.AT.AT import baseDir [as 别名]
def test_dir(self):
at = AT({'alias': 'h'})
basedir = at.baseDir("/tmp/")
fullpath = at.dir("test.test")
if(self.verbose):
print "\nAT Fullpath:", fullpath
self.assertEqual(fullpath, "/tmp/test.test")
示例4: test_AT_mkdir
# 需要导入模块: from admit.AT import AT [as 别名]
# 或者: from admit.AT.AT import baseDir [as 别名]
def test_AT_mkdir(self):
""" test AT mkdir() """
at = AT({'alias': 's'})
# test with full path
tmpdir = "/tmp/test1_%d" % os.getpid()
at.mkdir(tmpdir)
self.assertTrue(os.path.exists(tmpdir))
os.rmdir(tmpdir)
# test with relative path
basedir = at.baseDir("/tmp/")
tail = "test2_%d" % os.getpid()
tmpdir = "/tmp/" + tail
at.mkdir(tail)
self.assertTrue(os.path.exists(tmpdir))
os.rmdir(tmpdir)
示例5: test_mkdir
# 需要导入模块: from admit.AT import AT [as 别名]
# 或者: from admit.AT.AT import baseDir [as 别名]
def test_mkdir(self):
at = AT({'alias': 's'})
# test with full path
tmpdir = "/tmp/test1_%d" % os.getpid()
at.mkdir(tmpdir)
t1 = os.path.exists(tmpdir)
self.assertEqual(t1, True)
os.rmdir(tmpdir)
# test with relative path
basedir = at.baseDir("/tmp/") # set base dir to /tmp/
tail = "test2_%d" % os.getpid()
tmpdir = "/tmp/" + tail
at.mkdir(tail)
t1 = os.path.exists(tmpdir)
self.assertEqual(t1, True)
os.rmdir(tmpdir)