def __init__(self, suite, name, full_path, strict_mode): self.suite = suite self.name = name self.full_path = full_path self.strict_mode = strict_mode f = open(self.full_path) self.contents = f.read() f.close() testRecord = parseTestRecord(self.contents, name) self.test = testRecord["test"] del testRecord["test"] del testRecord["header"] del testRecord["commentary"] self.testRecord = testRecord
def __init__(self, suite, name, full_path, strict_mode): self.suite = suite self.name = name self.full_path = full_path self.strict_mode = strict_mode f = open(self.full_path) self.contents = f.read() f.close() testRecord = parseTestRecord(self.contents, name) self.test = testRecord["test"] del testRecord["test"] del testRecord["header"] testRecord.pop("commentary", None) # do not throw if missing self.testRecord = testRecord;
def __init__(self, full_path): self.name = os.path.basename(full_path) self.suite = self self.full_path = full_path self.strict_mode = False f = open(self.full_path) self.contents = f.read() f.close() testRecord = parseTestRecord(self.contents, self.name) self.test = testRecord["test"] del testRecord["test"] del testRecord["header"] testRecord.pop("commentary", None) # do not throw if missing self.testRecord = testRecord
def __init__(self, suite, name, full_path, strict_mode): self.suite = suite self.name = name self.full_path = full_path self.strict_mode = strict_mode f = open(self.full_path) self.contents = f.read() f.close() testRecord = parseTestRecord(self.contents, name) self.test = testRecord["test"] del testRecord["test"] del testRecord["header"] testRecord.pop("commentary", None) # do not throw if missing self.testRecord = testRecord self.validate()
def __init__(self, suite, name, full_path, strict_mode): self.suite = suite self.name = name self.full_path = full_path self.strict_mode = strict_mode f = open(self.full_path) self.contents = f.read() f.close() testRecord = parseTestRecord(self.contents, name) self.test = testRecord["test"] if 'features' in testRecord: self.features = testRecord["features"] else: self.features = [] del testRecord["test"] del testRecord["header"] self.testRecord = testRecord
def convertDocString(docString): envelope = parseTestRecord.parseTestRecord(docString, '') envelope.pop('header', None) envelope.pop('test', None) return envelope