示例#1
0
def TestData(source, parent=None, settings=None):
    """Parses a file or directory to a corresponding model object.

    :param source: path where test data is read from.
    :returns: :class:`~.model.TestDataDirectory`  if `source` is a directory,
        :class:`~.model.TestCaseFile` otherwise.
    """
    if os.path.isdir(source):
        data = TestDataDirectoryWithExcludes(parent, source, settings)
        data.populate()
        return data
    return robotapi.TestCaseFile(parent, source).populate()
示例#2
0
def TestData(source, parent=None, settings=None):
    """Parses a file or directory to a corresponding model object.

    :param source: path where test data is read from.
    :returns: :class:`~.model.TestDataDirectory`  if `source` is a directory,
        :class:`~.model.TestCaseFile` otherwise.
    """
    if os.path.isdir(source):
        # print("DEBUG: Dataloader Is dir getting testdada %s\n" % source)
        data = TestDataDirectoryWithExcludes(parent, source, settings)
        # print("DEBUG: Dataloader testdata %s\n" % data.name)
        data.populate()
        # print("DEBUG: Dataloader after populate %s  %s\n" % (data._tables, data.name))
        return data
    return robotapi.TestCaseFile(parent, source).populate()
def NewTestCaseFile(path):
    datafile = robotapi.TestCaseFile(source=path)
    datafile.start_table(['Test Cases'])
    _create_missing_directories(datafile.directory)
    return datafile
示例#4
0
def NewTestCaseFile(path):  #新测试案例文件
    datafile = robotapi.TestCaseFile(source=path)
    _create_missing_directories(datafile.directory)
    return datafile