本文整理汇总了Python中EDUtilsTest.EDUtilsTest.getTestsDataHome方法的典型用法代码示例。如果您正苦于以下问题:Python EDUtilsTest.getTestsDataHome方法的具体用法?Python EDUtilsTest.getTestsDataHome怎么用?Python EDUtilsTest.getTestsDataHome使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EDUtilsTest.EDUtilsTest
的用法示例。
在下文中一共展示了EDUtilsTest.getTestsDataHome方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: getTestsDataHome
# 需要导入模块: from EDUtilsTest import EDUtilsTest [as 别名]
# 或者: from EDUtilsTest.EDUtilsTest import getTestsDataHome [as 别名]
def getTestsDataHome(self):
"""
Returns the Test data home directory
@return: TestsDataHome
@rtype: string
"""
if (self.__strTestsDataHome is None):
self.__strTestsDataHome = EDUtilsTest.getTestsDataHome()
return self.__strTestsDataHome
示例2: __init__
# 需要导入模块: from EDUtilsTest import EDUtilsTest [as 别名]
# 或者: from EDUtilsTest.EDUtilsTest import getTestsDataHome [as 别名]
def __init__(self, _strPluginName, _strPluginDir=None, _strTestName=None):
"""
Initialize the test case by determining the paths to the plugin home and plugin test directories.
"""
EDTestCase.__init__(self, _strTestName)
self.__strPluginName = _strPluginName
self.__strTestsDataDir = None
self.__strPluginTestsDataDir = None
self.__strPluginHome = EDUtilsTest.getFactoryPluginTest().getModuleLocation(_strPluginName)
self.__strPluginTestsDataHome = EDUtilsTest.getPluginTestDataDirectory(self.getClassName())
self.__listRequiredConfigurationPluginNames = []
self.__strConfigurationFile = None
self.__dictConfigurations = {} #key=pluginName ; value=config
self.dictReplace = {"${EDNA_TESTS_DATA_HOME}": EDUtilsTest.getTestsDataHome(),
"${EDNA_PLUGIN_TESTS_DATA_HOME}" : self.getPluginTestsDataHome(),
"${EDNA_HOME}": EDUtilsPath.getEdnaHome(),
"${USER}": os.getenv("USER", "UndefindedUser"),
"${TMPDIR}": os.getenv("TMPDIR", tempfile.gettempdir()),
}
示例3: preProcess
# 需要导入模块: from EDUtilsTest import EDUtilsTest [as 别名]
# 或者: from EDUtilsTest.EDUtilsTest import getTestsDataHome [as 别名]
def preProcess(self):
"""
PreProcess of the execution test: download an EDF file from http://www.edna-site.org
and remove any existing output file, i.e. /tmp/diff6105.edf
"""
EDTestCasePluginExecute.preProcess(self)
self.loadTestImage([ "test_region1_dark_1_0040.edf"])
xsDataInputReference = XSDataInputExecCommandLine.parseString(self.readAndParseFile (self.getDataInputFile()))
strInputFile = xsDataInputReference.getInputFileName().getPath().getValue()
if not(os.path.isdir(os.path.dirname(strInputFile))):
os.makedirs(os.path.dirname(strInputFile), int("777", 8))
EDVerbose.DEBUG("temporary filename is :" + strInputFile)
shutil.copy(os.path.join(EDUtilsTest.getTestsDataHome(), "images", "test_region1_dark_1_0040.edf"), strInputFile)
strInputXML = self.readAndParseFile (self.getDataInputFile())
xsDataInputReference = XSDataInputExecCommandLine.parseString(strInputXML)
outputFileName = xsDataInputReference.getInputFileName().getPath().getValue() + ".gz"
EDVerbose.DEBUG(" Output file is %s" % outputFileName)
if os.path.isfile(outputFileName):
EDVerbose.DEBUG(" Output file exists %s, I will remove it" % outputFileName)
os.remove(outputFileName)
开发者ID:olofsvensson,项目名称:edna-plugins-exec,代码行数:23,代码来源:EDTestCasePluginExecuteExecCommandLinev10_fireAndForget.py