only called by tests
498475
public void initialiseParamValues(final Step step) {
        final HashMap<String, String> map = new HashMap<String, String>();

        final String[] paramValues = Util.getArgs(this.parent.getPattern(),
            step.getLine(), null);

        if (paramValues != null) {
            for (int i = 0; i < paramValues.length; i++) {
                map.put(this.parent.getParamNames().get(i), paramValues[i]);
            }
        }
        this.paramValueMap = new ExampleParameter(step.getSourceLineNumber(),
            map);
    }
1111022
def dependency_ran(self, test):
        """"""
        for d in (self.test_name(i) for i in dependencies[test]):
            if d not in self.ok_results:
                return "Required test '{}' did not run (does it exist?)".format(d)
        return None
1147029
def each_with_something( test, max=0, name=nil )
      num = 0
      child=nil
      @elements.each( name ){ |child|
        yield child if test.call(child) and num += 1
        return if max>0 and num == max
      }
    end
150418
function wru(wru){var assert=wru.assert,async=wru.async,log=wru.log;

// enojy your tests!



wru.test([
    {
        name: "it works!",
        test: function () {
            // sync
            wru.assert(1);
            
            // async
            setTimeout(async(function () { // wru.async
                assert("called"); // wru.assert
            }), 500);
        }
    }
]);



}
800117
def emit_only(self, event: str, func_names: Union[str, List[str]], *args,
                  **kwargs) -> None:
        
        if isinstance(func_names, str):
            func_names = [func_names]

        for func in self._event_funcs(event):
            if func.__name__ in func_names:
                func(*args, **kwargs)
768485
function (test) {
                const bits = QRUtil.getBCHTypeNumber(_typeNumber);

                for (var i = 0; i < 18; i += 1) {
                    var mod = (!test && ((bits >> i) & 1) == 1);
                    /** @type {(boolean|null)[][]} */
                    (_modules)[Math.floor(i / 3)][i % 3 + _moduleCount - 8 - 3] = mod;
                }

                for (var i = 0; i < 18; i += 1) {
                    var mod = (!test && ((bits >> i) & 1) == 1);
                    /** @type {(boolean|null)[][]} */
                    (_modules)[i % 3 + _moduleCount - 8 - 3][Math.floor(i / 3)] = mod;
                }
            }
22706
function callOnce(fn) {
  var called = false

  return calledOnceShim

  //-----------------------------------
  function calledOnceShim() {
    if (called) return
    called = true

    fn.apply(this, arguments)
  }
}
395163
def run(self):
        '''
        
        '''
        # Run all tests.
        for cls in self.get_test_classes():

            # Print informational message.
            self.logger.info('Running {cls.__name__} test...'.format(cls=cls))

            # Create new test instance.
            test = cls(runner=self)

            # Run test and evaluate result.
            if test._run():
                self.logger.passed('Test {cls.__name__} succeeded!'.format(cls=cls))
            else:
                self.logger.failed('Test {cls.__name__} failed!'.format(cls=cls))
                self.has_passed = False

        # Print summary.
        if self.has_passed:
            self.logger.passed('Summary: All tests passed!')
        else:
            self.logger.failed('Summary: One or more tests failed!')

        return self.has_passed
204117
function(callback){
        for(this._itr; this._itr < this._data.length; this._itr++) {
            this._testFunction.call(this, this._itr);
        }

        callback.call(this, this._res);
	}
96142
function (partStatistics) {
        this.count += partStatistics.count;
        this.tested += partStatistics.tested;
        this.ignored += partStatistics.ignored;
    }
719892
function(name, f) {
      // Create the Test object
      var test = new Test(name, f);
      JSLitmus._tests.push(test);

      // Re-render if the test state changes
      test.onChange = JSLitmus.renderTest;

      // Run the next test if this one finished
      test.onStop = function(test) {
        if (JSLitmus.onTestFinish) JSLitmus.onTestFinish(test);
        JSLitmus.currentTest = null;
        JSLitmus._nextTest();
      };

      // Render the new test
      this.renderTest(test);
    }
61600
def main():
    
    parser = argparse.ArgumentParser()
    sub_parser = parser.add_subparsers()

    lint_parser = sub_parser.add_parser('lint')
    lint_parser.set_defaults(func=lint)

    unit_test_parser = sub_parser.add_parser('unit-test')
    unit_test_parser.set_defaults(func=unit_test)

    test_suite_parser = sub_parser.add_parser('test-suite')
    test_suite_parser.set_defaults(func=test_suite)

    args, extra_args = parser.parse_known_args()

    if extra_args:
        args.func(extra_args)
    else:
        args.func()
396982
def call_only_once(func):
    '''
    
    '''

    def new_func(*args, **kwargs):
        if not new_func._called:
            new_func._called = True
            return func(*args, **kwargs)

    new_func._called = False
    return new_func
1069838
public <V> V run(Callable<V> testCallable) throws Exception {
    try {
      beforeRun();
      return testCallable.call();
    } finally {
      afterRun();
      restoreOriginal();
    }
  }
778855
function(mocha, test) {
        test.parent._onlyTests = test.parent._onlyTests.concat(test);
        mocha.options.hasOnly = true;
        return test;
      }
147314
public static boolean isRunnable(Method method, String[] filters) {
		// Get the ROX annotations
		RoxableTest mAnnotation = method.getAnnotation(RoxableTest.class);
		RoxableTestClass cAnnotation = method.getDeclaringClass().getAnnotation(RoxableTestClass.class);

		if (mAnnotation != null || cAnnotation != null) {
			return isRunnable(new FilterTargetData(method, mAnnotation, cAnnotation), filters);
		}		

		return true;
	}
951762
def call(test_framework)
      begin
        initializers.find { |i| i.match? test_framework }.start [], {}
      rescue ArgumentError => e
        $stderr.puts e.message
        exit 0
      end

      Initializers::CommonInitializer.start [], {}
    end