def __init__(self, instance, name, typeName, metaData = None): __pychecker__ = "no-noeffect" # two or stmts below super(FloatAdapter, self).__init__(instance, name, typeName, metaData = metaData) metaData = metaData or {} self.precision = metaData.get("%s.precision" % name) or 4 self.charBounds = metaData.get("%s.charBounds" % name) or "5" self.checkOptions = "eer" # current default, change for 2.0??? self.checkOptions = firstNonNone(FitGlobal.appConfigInterface( "fpTypeAdapterCheck"), self.checkOptions) self.checkOptions = firstNonNone(metaData.get( "%s.checkType" % name), self.checkOptions)
def __init__(self, instance, name, typeName, metaData=None): __pychecker__ = "no-noeffect" # two or stmts below super(FloatAdapter, self).__init__(instance, name, typeName, metaData=metaData) metaData = metaData or {} self.precision = metaData.get("%s.precision" % name) or 4 self.charBounds = metaData.get("%s.charBounds" % name) or "5" self.checkOptions = "eer" # current default, change for 2.0??? self.checkOptions = firstNonNone( FitGlobal.appConfigInterface("fpTypeAdapterCheck"), self.checkOptions) self.checkOptions = firstNonNone(metaData.get("%s.checkType" % name), self.checkOptions)
def _extractColumnTypeFromOldMarkup(self, label, typeDict): __pychecker__ = "no-noeffect" # or below; doesn't seem to work. if len(label) == 0: name = "" colType = "comment" elif (label.startswith("?")): name = "" colType = "ignore" elif (label.startswith("=")): name = self._trimEndingMarkup(label[1:]) colType = "saveResult" elif (label.endswith("()")): name = label[:-2] colType = "result" elif (label[-1] in ("?", "!")): name = label[:-1] colType = "result" elif (label.endswith("=")): name = label[:-1] colType = "storeSaved" else: name = label colType = "given" identifier = self.camel(name) if colType == "given": newKind = self._extractColumnTypeUsingMetadata(identifier, typeDict) colType = firstNonNone(newKind, colType) return identifier, colType
def run(self, args): if not self.args(args): return False self.handler = StandardResultHandler(self._pageName, self._host, self._port) self.establishCommonTopLevelOptions(self.options, self._pythonPath) self.pushRunOptionsToTest() self.establishConnection(self.makeHttpRequest(), self._host, self._port) self.validateConnection() if not self.options.pythonPath: classpathItems = self._processClasspathDocument() if classpathItems: cpMsg = "Classpath received from server: " + classpathItems if self.options.verbose: conMsg.rmsg(cpMsg) else: conMsg.tmsg(cpMsg) self._pythonPath, renamesFileName = self.extractPythonPath( classpathItems, self.options) self._renamesFileName = firstNonNone(renamesFileName, self._renamesFileName) self.pushRunOptionsToTest() self.establishTestLevelOptions(self.options, self._pythonPath) FG.appConfigInterface("beforeRunExecution") self.executor = FitNesseTestExecutor(self.fixtureListener, self.options) result = self.executor.process(self._renamesFileName) FG.appConfigInterface("afterRunExecution", result) self._finalCount() self.closeConnection() self.handler.cleanUp() self._statsHandler.endOfAllTests() self._statsHandler.writeStats() return True