triggered for scenario based tests: cept, cest
554880
public function beforeSuite(SuiteEvent $e)
    {
        $this->namespace = "";
        $settings = $e->getSettings();
        if (isset($settings['namespace'])) {
            $this->namespace = $settings['namespace'];
        }
        $this->message("%s Tests (%d) ")
            ->with(ucfirst($e->getSuite()->getName()), $e->getSuite()->count())
            ->style('bold')
            ->width($this->width, '-')
            ->prepend("\n")
            ->writeln();

        if ($e->getSuite() instanceof Suite) {
            $message = $this->message(
                implode(
                    ', ',
                    array_map(
                        function ($module) {
                            return $module->_getName();
                        },
                        $e->getSuite()->getModules()
                    )
                )
            );

            $message->style('info')
                ->prepend('Modules: ')
                ->writeln(OutputInterface::VERBOSITY_VERBOSE);
        }

        $this->message('')->width($this->width, '-')->writeln(OutputInterface::VERBOSITY_VERBOSE);
    }
180320
def default(session):
    
    # Install all test dependencies, then install local packages in-place.
    session.install('mock', 'pytest', 'pytest-cov')
    for local_dep in LOCAL_DEPS:
        session.install('-e', local_dep)
    session.install('-e', '.')

    # Run py.test against the unit tests.
    session.run(
        'py.test',
        '--quiet',
        '--cov=google.cloud.storage',
        '--cov=tests.unit',
        '--cov-append',
        '--cov-config=.coveragerc',
        '--cov-report=',
        '--cov-fail-under=97',
        'tests/unit',
        *session.posargs
    )
391794
function(test) {
  var base = tapeTemps.base({
    testTitle: test.testTitle
  });
  var plan = tapeTemps.plan({
    assertions: test.assertions.length
  });
  return base + indent + plan + _renderAssertions(test.assertions) + '});' + eol;
}
244709
def _run_sequence(self, sequence):
        '''
        
        '''
        self._check_pause()
        self._pre_test()
        session_data = self.target.get_session_data()
        self._test_info()
        resp = None
        for edge in sequence:
            if edge.callback:
                edge.callback(self, edge, resp)
            session_data = self.target.get_session_data()
            node = edge.dst
            node.set_session_data(session_data)
            resp = self._transmit(node)
        return self._post_test()
644987
function (cb, context) {
        assertSeriesInitialized(this);
        each(this._seriesIndices, function (rawSeriesIndex) {
            var series = this._componentsMap.get('series')[rawSeriesIndex];
            cb.call(context, series, rawSeriesIndex);
        }, this);
    }
1344957
def nice_true_ces(tc):
    """"""
    cause_list = []
    next_list = []
    cause = '<--'
    effect = '-->'
    for event in tc:
        if event.direction == Direction.CAUSE:
            cause_list.append(["{0:.4f}".format(round(event.alpha, 4)),
                               event.mechanism, cause, event.purview])
        elif event.direction == Direction.EFFECT:
            next_list.append(["{0:.4f}".format(round(event.alpha, 4)),
                              event.mechanism, effect, event.purview])
        else:
            validate.direction(event.direction)

    true_list = [(cause_list[event], next_list[event])
                 for event in range(len(cause_list))]
    return true_list
922613
def generate_checks(fact):
    """"""

    yield TypeCheck(type(fact))

    fact_captured = False
    for key, value in fact.items():
        if (isinstance(key, str)
                and key.startswith('__')
                and key.endswith('__')):
            # Special fact feature
            if key == '__bind__':
                yield FactCapture(value)
                fact_captured = True
            else:  # pragma: no cover
                yield FeatureCheck(key, value)
        else:
            yield FeatureCheck(key, value)

    # Assign the matching fact to the context
    if not fact_captured:
        yield FactCapture("__pattern_%s__" % id(fact))
39598
def validate():
    """"""

    errors = dict()
    for test in (test_architecture,
                 test_pyqt_availability,
                 test_pyblish_availability,
                 test_qtconf_availability,
                 test_qtconf_correctness,
                 test_qt_availability):
        try:
            test()
        except Exception as e:
            errors[test] = e

    if not errors:
        print("=" * 78)
        print()
        print(""" - Success!

{exe} is well suited to run Pyblish QML""".format(exe=sys.executable))
        print()
        print("=" * 78)

        return True

    print("=" * 78)
    print()
    print(" - Failed")
    print()
    for test, error in errors.iteritems():
        print(test.__name__)
        print("    %s" % error)
    print()
    print("=" * 78)

    return False
788455
def coverage(ctx, opts=""):
    
    return test(ctx, coverage=True, include_slow=True, opts=opts)
937653
protected boolean executeOneCompleteStmt(final String _complStmt,
                                             final List<Instance> _instances)
        throws EFapsException
    {
        final boolean ret = false;
        ConnectionResource con = null;
        try {
            con = Context.getThreadContext().getConnectionResource();

            final Statement stmt = con.createStatement();

            final ResultSet rs = stmt.executeQuery(_complStmt.toString());
            final Map<Long, List<Long>> link2clazz = new HashMap<>();
            while (rs.next()) {
                final long linkId = rs.getLong(2);
                final long classificationID = rs.getLong(3);
                final List<Long> templ;
                if (link2clazz.containsKey(linkId)) {
                    templ = link2clazz.get(linkId);
                } else {
                    templ = new ArrayList<>();
                    link2clazz.put(linkId, templ);
                }
                templ.add(classificationID);
            }
            for (final Instance instance : _instances) {
                this.instances2classId.put(instance, link2clazz.get(instance.getId()));
            }
            rs.close();
            stmt.close();
        } catch (final SQLException e) {
            throw new EFapsException(ClassificationValueSelect.class, "executeOneCompleteStmt", e);
        }
        return ret;
    }
618152
function(fromSuite, toSuite) {
      each(fromSuite.specs, function(spec){
        spec.assertions = []
        toSuite.specs.push(spec)
      })
    }
1277803
function(results, run, options, done) {

    run.errmessages = concatErrMessages(run.errmessages, results.errmessages);
    _.forOwn(results.modules, function(pkg, pkgName) {

      var npkg = {
        name: pkgName,
        suites: [],
        tests: pkg.tests,
        failures: pkg.failures,
        errors: pkg.errors,
        isFailure: (pkg.failures !== 0 && pkg.errors !== 0)
      };

      _.forOwn(pkg.completed, function(suite, suiteName) {

        var nsuite = {
          name: suiteName,
          pkgName: npkg.name,
          passed: suite.passed,
          failures: suite.failed,
          errors: suite.errors,
          skipped: suite.skipped,
          time: suite.time,
          cases: []
        };

        // Little weird here but the report object
        // will not report an error, it will instead
        // have X failed and empty assertions array.
        if (nsuite.failures > 0 && suite.assertions.length === 0)
          nsuite.errors = nsuite.failures;

        nsuite.isFailure = nsuite.failures !== 0 || nsuite.errors !== 0;
        npkg.suites.push(nsuite);

        _.each(suite.assertions, function(assertion) {

          var assert = _.clone(assertion, true);
          assert.screenshots = assert.screenshots || [];
          assert.isFailure = assertion.failure;
          nsuite.cases.push(assert);

          if (options.relativeScreenshots) {
            assert.screenshots = assert.screenshots.map(function(sspath) {
              return getRelativePath(options.fullOutputFilename, sspath);
            });
          }

          if (assert.isFailure)
            nsuite.isFailure = true;

        });

        if (nsuite.isFailure)
          npkg.isFailure = true;

      });

      run.addPackage(npkg);

      if (npkg.isFailure)
        run.isFailure = npkg.isFailure;

    });

    done(null, run);

  }
313016
private void triggerContentEstablished(PayloadType pt, TransportCandidate rc, TransportCandidate lc) throws NotConnectedException, InterruptedException {

        // Let the session know that we've established a content/media segment.
        JingleSession session = getSession();
        if (session != null) {
            List<JingleListener> listeners = session.getListenersList();
            for (JingleListener li : listeners) {
                if (li instanceof JingleSessionListener) {
                    JingleSessionListener sli = (JingleSessionListener) li;
                    sli.sessionEstablished(pt, rc, lc, session);
                }
            }
        }

        // Create a media session for each media manager in the session.
        if (mediaNeg.getMediaManager() != null) {
            rc.removeCandidateEcho();
            lc.removeCandidateEcho();

            jingleMediaSession = getMediaNegotiator().getMediaManager().createMediaSession(pt, rc, lc, session);
            jingleMediaSession.addMediaReceivedListener(session);
            if (jingleMediaSession != null) {

                jingleMediaSession.startTransmit();
                jingleMediaSession.startReceive();

                for (TransportCandidate candidate : getTransportNegotiator().getOfferedCandidates())
                    candidate.removeCandidateEcho();
            }
            JingleMediaManager mediaManager = getMediaNegotiator().getMediaManager();
            getSession().addJingleMediaSession(mediaManager.getName(), jingleMediaSession);
        }

    }
403984
def addSuccess(self, test, capt):
        
        self.__insert_test_result(constants.State.PASS, test)
459180
function(test) {
			var context = this.loopContext;
			var forkContext = this.forkContext;
			var testSegments = forkContext.makeNext(0, -1);

			// Update state.
			context.test = test;
			context.continueDestSegments = testSegments;
			forkContext.replaceHead(testSegments);
		}
36928
def bdd_common_after_scenario(context_or_world, scenario, status):
    
    if status == 'skipped':
        return
    elif status == 'passed':
        test_status = 'Pass'
        test_comment = None
        context_or_world.logger.info("The scenario '%s' has passed", scenario.name)
    else:
        test_status = 'Fail'
        test_comment = "The scenario '%s' has failed" % scenario.name
        context_or_world.logger.error("The scenario '%s' has failed", scenario.name)
        context_or_world.global_status['test_passed'] = False

    # Close drivers
    DriverWrappersPool.close_drivers(scope='function', test_name=scenario.name, test_passed=status == 'passed',
                                     context=context_or_world)

    # Save test status to be updated later
    add_jira_status(get_jira_key_from_scenario(scenario), test_status, test_comment)
796627
function() {
			var context = this.loopContext;
			var choiceContext = this.choiceContext;
			var forkContext = this.forkContext;

			// Make the next paths of the test.
			if (context.testSegments) {
				finalizeTestSegmentsOfFor(
					context,
					choiceContext,
					forkContext.head);
			} else {
				context.endOfInitSegments = forkContext.head;
			}

			// Update state.
			var updateSegments = forkContext.makeDisconnected(-1, -1);

			context.continueDestSegments = context.updateSegments = updateSegments;
			forkContext.replaceHead(updateSegments);
		}