Returns the parameters to a test from its log document
964966
public static XdmNode getParamsFromLog(
            net.sf.saxon.s9api.DocumentBuilder builder, Document log)
            throws Exception {
        Element starttest = (Element) log.getElementsByTagName("starttest")
                .item(0);
        NodeList nl = starttest.getElementsByTagName("params");
        if (nl == null || nl.getLength() == 0) {
            return null;
        } else {
            Document doc = DomUtils.createDocument(nl.item(0));
            return builder.build(new DOMSource(doc));
        }
    }
1350235
def _get_rslt_params(self, result, namespace):
        
        rtn_objects = []
        end_of_sequence = False
        enumeration_context = None
        end_of_sequence_found = False  # flag True if found and valid value
        enumeration_context_found = False  # flag True if ec tuple found
        for p in result:
            if p[0] == 'EndOfSequence':
                if isinstance(p[2], six.string_types):
                    p2 = p[2].lower()
                    if p2 in ['true', 'false']:  # noqa: E125
                        end_of_sequence = True if p2 == 'true' else False
                        end_of_sequence_found = True
                    else:
                        raise CIMXMLParseError(
                            _format("EndOfSequence output parameter has an "
                                    "invalid value: {0!A}", p[2]),
                            conn_id=self.conn_id)

            elif p[0] == 'EnumerationContext':
                enumeration_context_found = True
                if isinstance(p[2], six.string_types):
                    enumeration_context = p[2]

            elif p[0] == "IRETURNVALUE":
                rtn_objects = p[2]

        if not end_of_sequence_found and not enumeration_context_found:
            raise CIMXMLParseError(
                "Expected EndOfSequence or EnumerationContext output "
                "parameter in open/pull response, but none received",
                conn_id=self.conn_id)

        if not end_of_sequence and enumeration_context is None:
            raise CIMXMLParseError(
                "Expected EnumerationContext output parameter because "
                "EndOfSequence=False, but did not receive it.",
                conn_id=self.conn_id)

        # Drop enumeration_context if eos True
        # Returns tuple of enumeration context and namespace
        rtn_ctxt = None if end_of_sequence else (enumeration_context,
                                                 namespace)
        return (rtn_objects, end_of_sequence, rtn_ctxt)
1170375
function(){
		var self = this,
			logs = self._filterLogs(),
			all = logs.all,
			keys = logs.keys,
			time = munit._relativeTime( self.end - self.start );

		// Root module
		if ( ! self.callback ) {
			munit.color.green( "=== All submodules of " + self.nsPath + " have finished ===" );
			return;
		}

		// Content
		munit.color.blue( "\n" + self.nsPath );
		munit.each( self.tests, function( test ) {
			if ( keys[ test.name ] && keys[ test.name ].length ) {
				keys[ test.name ].forEach(function( args ) {
					munit.log.apply( munit, args );
				});
			}

			if ( test.error ) {
				munit.color.red( test.ns );
				munit.log( "\n", test.error.stack );
				munit.log( "\n" );
			}
			else if ( test.skip ) {
				munit.color.gray( "[skipped] " + test.ns );
				munit.color.gray( "\treason: " + test.skip );
			}
			else {
				munit.color.green( test.ns );
			}
		});

		// Logs made after the final test
		if ( all.length ) {
			all.forEach(function( args ) {
				munit.log.apply( munit, args );
			});
		}

		// Final Output
		if ( self.failed ) {
			munit.color.red( "\n-- " + self.failed + " tests failed on " + self.nsPath + " (" + time + ") --\n" );
		}
		else {
			munit.color.green( "\n-- All " + self.passed + " tests passed on " + self.nsPath + " (" + time + ") --\n" );
		}
	}
423710
def getParameterValue(self, parameterName):
        
        if  self._results is None:
            self.__init()
        parameter = self._results[parameterName]
        return parameter
1018993
def check_and_format_logs_params(start, end, tail):
    """"""
    def _decode_duration_type(duration_type):
        durations = {'m': 'minutes', 'h': 'hours', 'd': 'days', 'w': 'weeks'}
        return durations[duration_type]

    if not start:
        if tail:
            start_dt = maya.now().subtract(seconds=300).datetime(naive=True)
        else:
            start_dt = maya.now().subtract(days=1).datetime(naive=True)
    elif start and start[-1] in ['m', 'h', 'd', 'w']:
        value = int(start[:-1])
        start_dt = maya.now().subtract(
            **{_decode_duration_type(start[-1]): value}).datetime(naive=True)
    elif start:
        start_dt = maya.parse(start).datetime(naive=True)

    if end and end[-1] in ['m', 'h', 'd', 'w']:
        value = int(end[:-1])
        end_dt = maya.now().subtract(
            **{_decode_duration_type(end[-1]): value}).datetime(naive=True)
    elif end:
        end_dt = maya.parse(end).datetime(naive=True)
    else:
        end_dt = None
    return start_dt, end_dt
129501
def save_all_webdriver_logs(cls, test_name, test_passed):
        
        log_name = '{} [driver {}]' if len(cls.driver_wrappers) > 1 else '{}'
        driver_index = 1
        for driver_wrapper in cls.driver_wrappers:
            if not driver_wrapper.driver or driver_wrapper.server_type in ['ggr', 'selenoid']:
                continue
            if driver_wrapper.config.getboolean_optional('Server', 'logs_enabled') or not test_passed:
                try:
                    driver_wrapper.utils.save_webdriver_logs(log_name.format(test_name, driver_index))
                except Exception as exc:
                    # Capture exceptions to avoid errors in teardown method due to session timeouts
                    driver_wrapper.logger.warn('Error downloading webdriver logs: %s' % exc)
            driver_index += 1
91631
def _get_log_format(self, request):
        """"""
        user = getattr(request, 'user', None)
        if not user:
            return
        if not request.user.is_authenticated:
            return
        method = request.method.upper()
        if not (method in self.target_methods):
            return
        request_url = urlparse.unquote(request.path)
        for rule in self._ignored_urls:
            if rule.search(request_url):
                return
        return self.format
294571
def mavparms(logfile):
    ''''''
    mlog = mavutil.mavlink_connection(filename)

    while True:
        try:
            m = mlog.recv_match(type=['PARAM_VALUE', 'PARM'])
            if m is None:
                return
        except Exception:
            return
        if m.get_type() == 'PARAM_VALUE':
            pname = str(m.param_id).strip()
            value = m.param_value
        else:
            pname = m.Name
            value = m.Value
        if len(pname) > 0:
            if args.changesOnly is True and pname in parms and parms[pname] != value:
                print("%s %-15s %.6f -> %.6f" % (time.asctime(time.localtime(m._timestamp)), pname, parms[pname], value))

            parms[pname] = value
977254
def get_params(self):
        
        assert self.binded and self.params_initialized
        self._curr_module._params_dirty = self._params_dirty
        params = self._curr_module.get_params()
        self._params_dirty = False
        return params
505586
def job_get_log(object_id, input_params={}, always_retry=False, **kwargs):
    
    return DXHTTPRequest('/%s/getLog' % object_id, input_params, always_retry=always_retry, **kwargs)
923669
def __log_all_options_if_none_specified(self, test):
        
        if ((not self.options.enable_plugin_basic_test_info) and (
                not self.options.enable_plugin_screen_shots) and (
                not self.options.enable_plugin_page_source)):
            test_logpath = self.options.log_path + "/" + test.id()
            log_helper.log_screenshot(test_logpath, test.driver)
            log_helper.log_test_failure_data(
                test, test_logpath, test.driver, test.browser)
            log_helper.log_page_source(test_logpath, test.driver)
686244
function getParams(args, proto, ObjName) {

    if (null == proto) {
        logger.error('No proto File Configured！');
        return {};
    } else if (typeof proto == "string") {
        if (fs.existsSync(proto)) {
            proto = ProtoBuf.loadProtoFile(proto);
        } else if (fs.existsSync(proto + ".proto")) {
            proto = ProtoBuf.loadProtoFile(proto + ".proto");
        } else {
            return {};
        }
    }

    var Obj = proto.build(ObjName);
    var msg = Obj.decode64(args);
    debug && logger.trace("Load Data From Client [ %s ]", JSON.stringify(msg));
    return msg;
}
761168
def save_all_ggr_logs(cls, test_name, test_passed):
        
        log_name = '{} [driver {}]' if len(cls.driver_wrappers) > 1 else '{}'
        driver_index = 1
        for driver_wrapper in cls.driver_wrappers:
            if not driver_wrapper.driver or driver_wrapper.server_type not in ['ggr', 'selenoid']:
                continue
            try:
                if driver_wrapper.config.getboolean_optional('Server', 'logs_enabled') or not test_passed:
                    name = get_valid_filename(log_name.format(test_name, driver_index))
                    Selenoid(driver_wrapper).download_session_log(name)
            except Exception as exc:
                # Capture exceptions to avoid errors in teardown method due to session timeouts
                driver_wrapper.logger.warn('Error downloading GGR logs: %s' % exc)
            driver_index += 1
1046106
def _extract_docs_params(self):
        
        if self.dst.style['in'] == 'numpydoc':
            data = '\n'.join([d.rstrip().replace(self.docs['out']['spaces'], '', 1) for d in self.docs['in']['raw'].splitlines()])
            self.docs['in']['params'] += self.dst.numpydoc.get_param_list(data)
        elif self.dst.style['in'] == 'google':
            data = '\n'.join([d.rstrip().replace(self.docs['out']['spaces'], '', 1) for d in self.docs['in']['raw'].splitlines()])
            self.docs['in']['params'] += self.dst.googledoc.get_param_list(data)
        elif self.dst.style['in'] == 'groups':
            self._extract_groupstyle_docs_params()
        elif self.dst.style['in'] in ['javadoc', 'reST']:
            self._extract_tagstyle_docs_params()
904618
def params(self) -> T.List[DocstringParam]:
        """"""
        return [
            DocstringParam.from_meta(meta)
            for meta in self.meta
            if meta.args[0]
            in {"param", "parameter", "arg", "argument", "key", "keyword"}
        ]
888728
def _checkReturnValueEpytext(self, node, linenoDocstring):
        
        # Getter properties don't need to document their return value,
        # but then need to have a return value.
        if 'property' in _getDecoratorsName(node):
            if self._hasReturnValue(node):
                # Getter properties don't need a docstring.
                return

        # Check for return value.
        if self._hasReturnValue(node):
            if node.name.startswith('test_'):
                # Ignore return documentation for test methods.
                return
            if not re.search(r"@return[s]{0,1}\s*:", node.doc):
                self.add_message('W9204', line=linenoDocstring, node=node)
            if not re.search(r"@rtype\s*:", node.doc):
                self.add_message('W9205', line=linenoDocstring, node=node)
855263
def extractParams(xmlelement):
    
    params = list()
    children = list()
    for child in xmlelement.getchildren():
        param = getParam(child)
        if param:
            params.append(param)
        else:
            children.append(child)
    return params, children