Mainly for testing.
974524
def delete_table(table_name):
    """"""
    to_delete = [
        make_key(table_name, rec['id'])
        for rec in read_by_indexes(table_name, [])
    ]

    with DatastoreTransaction() as tx:
        tx.get_commit_req().mutation.delete.extend(to_delete)
1323319
def main():
    """"""
    args = parse_input()
    args.lock = True
    args.question = []
    args.all = False
    args.timeout = 0
    args.verbose = False
    args.interactive = False

    try:
        assign = assignment.load_assignment(args.config, args)

        msgs = messages.Messages()

        lock.protocol(args, assign).run(msgs)
    except (ex.LoadingException, ex.SerializeException) as e:
        log.warning('Assignment could not instantiate', exc_info=True)
        print('Error: ' + str(e).strip())
        exit(1)
    except (KeyboardInterrupt, EOFError):
        log.info('Quitting...')
    else:
        assign.dump_tests()
823842
@SuppressWarnings("PMD")
  public static void main(String[] args) {
    if (args.length < 2) {
      System.out.println("Usage: perf <registry> <test>");
      System.exit(1);
    }

    Registry registry = run(args[0], args[1]);

    GraphLayout igraph = GraphLayout.parseInstance(registry);
    System.out.println(igraph.toFootprint());
  }
543773
@Setup(Level.Trial)
  public void setup() throws Exception {
    test = benchmarks.get(list + "-" + type);
    if (test == null) {
      throw new RuntimeException("Can't find requested test " + list + " " + type);
    }
    test.setSize(size);
    test.setRandomSeed(size);  // TODO Use iteration some how
    test.setup();
  }
343236
function() {
		extend(config, {
			stats: { all: 0, bad: 0 },
			moduleStats: { all: 0, bad: 0 },
			started: +new Date,
			updateRate: 1000,
			blocking: false,
			autostart: true,
			autorun: false,
			filter: "",
			queue: [],
			semaphore: 0
		});

		var tests = id( "qunit-tests" ),
			banner = id( "qunit-banner" ),
			result = id( "qunit-testresult" );

		if ( tests ) {
			tests.innerHTML = "";
		}

		if ( banner ) {
			banner.className = "";
		}

		if ( result ) {
			result.parentNode.removeChild( result );
		}

		if ( tests ) {
			result = document.createElement( "p" );
			result.id = "qunit-testresult";
			result.className = "result";
			tests.parentNode.insertBefore( result, tests );
			result.innerHTML = 'Running...<br/>&nbsp;';
		}
	}
234738
function only( testName, callback ) {
	var newTest;

	if ( focused )  { return; }

	QUnit.config.queue.length = 0;
	focused = true;

	newTest = new Test( {
		testName: testName,
		callback: callback
	} );

	newTest.queue();
}
940175
function (cfg, callback) {
        results = {};

        // Generate a test targeting any CSS
        var all = {
            name : "__baseline__",
            cfg : cfg,
            selector : null,
            callback : {
                fn : allTests,
                scope : this,
                args : [cfg, callback]
            }
        };

        runTest(all);
    }
1216347
function () {
        var t = null;
        if (PFT.tester._tests.length > 0) {
            t = PFT.tester._tests[PFT.tester._tests.length - 1];
        }
        return t;
    }
479612
function() {
      for (var i = 0; i < JSLitmus._tests.length; i++)
        JSLitmus.renderTest(JSLitmus._tests[i]);
      JSLitmus.renderChart();
    }
426365
function() {
      while (JSLitmus._queue.length) {
        var test = JSLitmus._queue.shift();
        JSLitmus.renderTest(test);
      }
    }
276013
function() {
      if (!JSLitmus.currentTest) {
        var test = JSLitmus._queue.shift();
        if (test) {
          jsl.$('stop_button').disabled = false;
          JSLitmus.currentTest = test;
          test.run();
          JSLitmus.renderTest(test);
          if (JSLitmus.onTestStart) JSLitmus.onTestStart(test);
        } else {
          jsl.$('stop_button').disabled = true;
          JSLitmus.renderChart();
        }
      }
    }
156323
public function run(): bool
    {
        foreach ($this->collectTestDefinitions() as $key => $testDefinitionCollection) {
            if (count($testDefinitionCollection) > 0) {
                $this->printer->println(
                    $this->printer->colorize(
                        PrinterInterface::CYAN_BACKGROUND . PrinterInterface::WHITE,
                        $this->printGroupHeaderForKeyAndDefinition($key, reset($testDefinitionCollection))
                    )
                );
                /** @var DefinitionInterface $testDefinition */
                foreach ($testDefinitionCollection as $testDefinition) {
                    $this->printer->println($testDefinition->getDescription());
                }
            }
        }

        return true;
    }
805524
def trial(path=TESTS_PATH, coverage=False):
    
    args = ['trial']
    if coverage:
        args.append('--coverage')
    args.append(path)
    print args
    local(' '.join(args))
235452
def experiment(f=None, local_dependencies=None, start_chiboard=True, default_logdir=""):
  
  if not f:
    return lambda f: experiment(f, local_dependencies, start_chiboard, default_logdir)
  else:
    if sys.modules[f.__module__].__name__ == '__main__':
      a = Experiment(f, local_dependencies, start_chiboard, default_logdir)
      a.parse_args_and_run()

    return Experiment(f, local_dependencies, start_chiboard, default_logdir).run
610224
def experiment(self):
        """"""
        if self._experiment is None:
            self._experiment = list(self.config.experiments.keys())[-1]
        return self._experiment
377339
public function main()
    {
        $fail = $this->nestedConditionPresent() ? $this->testNestedCondition() :
            $this->testIfCondition() && $this->testUnlessCondition();

        if ($fail) {
            $text = null;
            if ($this->message !== null && strlen(trim($this->message)) > 0) {
                $text = trim($this->message);
            } else {
                if ($this->ifCondition !== null && $this->ifCondition !== "" && $this->testIfCondition()) {
                    $text = "if=" . $this->ifCondition;
                }
                if ($this->unlessCondition !== null && $this->unlessCondition !== "" && $this->testUnlessCondition()) {
                    if ($text === null) {
                        $text = "";
                    } else {
                        $text .= " and ";
                    }
                    $text .= "unless=" . $this->unlessCondition;
                }
                if ($this->nestedConditionPresent()) {
                    $text = "condition satisfied";
                } else {
                    if ($text === null) {
                        $text = "No message";
                    }
                }
            }

            $this->log("failing due to " . $text, Project::MSG_DEBUG);
            if ($this->status === null) {
                throw new BuildException($text);
            }

            throw new ExitStatusException($text, $this->status);
        }
    }
763103
function() {
      console.log('start : init test : ' + bench.initFcts.length);
      for (let i = 0; i < bench.initFcts.length; i++) {
        console.log(
          'initializing test data ' + (i + 1) + '/' + bench.initFcts.length
        );
        if (bench.initFcts[i]) {
          bench.initFcts[i].call(this, bench.CONN.MARIADB.drv);
        }
      }
      this.currentNb = 0;
      console.log('initializing test data done');
    }