just for local testing
340652
public static void main(String[] args) {
    Credentials cred = new Credentials(System.getProperty("user.name"), "Heslo123");
    String url = start(args, cred, "https://localhost:54321/", false);
    System.out.println("Proxy started on " + url + " " + cred.toDebugString());
  }
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;
                }
            }
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()
927501
def run():
    

    print('Python ' + sys.version.replace('\n', ''))

    try:
        oscrypto_tests_module_info = imp.find_module('tests', [os.path.join(build_root, 'oscrypto')])
        oscrypto_tests = imp.load_module('oscrypto.tests', *oscrypto_tests_module_info)
        oscrypto = oscrypto_tests.local_oscrypto()
        print('\noscrypto backend: %s' % oscrypto.backend())
    except (ImportError):
        pass

    if run_lint:
        print('')
        lint_result = run_lint()
    else:
        lint_result = True

    if run_coverage:
        print('\nRunning tests (via coverage.py)')
        sys.stdout.flush()
        tests_result = run_coverage(ci=True)
    else:
        print('\nRunning tests')
        sys.stdout.flush()
        tests_result = run_tests()
    sys.stdout.flush()

    return lint_result and tests_result
479612
function() {
      for (var i = 0; i < JSLitmus._tests.length; i++)
        JSLitmus.renderTest(JSLitmus._tests[i]);
      JSLitmus.renderChart();
    }
1215482
def snippets(session):
    """"""

    # Sanity check: Only run snippets tests if the environment variable is set.
    if not os.environ.get("GOOGLE_APPLICATION_CREDENTIALS", ""):
        session.skip("Credentials must be set via environment variable.")

    # Install all test dependencies, then install local packages in place.
    session.install("mock", "pytest")
    for local_dep in LOCAL_DEPS:
        session.install("-e", local_dep)
    session.install("-e", os.path.join("..", "storage"))
    session.install("-e", os.path.join("..", "test_utils"))
    session.install("-e", ".[all]")

    # Run py.test against the snippets tests.
    session.run("py.test", os.path.join("docs", "snippets.py"), *session.posargs)
    session.run("py.test", "samples", *session.posargs)
945724
def main():
    """"""

    parser = argparse.ArgumentParser(description=__doc__)
    parser.add_argument(
        'reportfile', type=argparse.FileType('r'),
        help="test report file generated by `guesslang --test TESTDIR`")
    parser.add_argument(
        '-d', '--debug', default=False, action='store_true',
        help="show debug messages")

    args = parser.parse_args()
    config_logging(args.debug)

    report = json.load(args.reportfile)
    graph_data = _build_graph(report)
    index_path = _prepare_resources(graph_data)
    webbrowser.open(str(index_path))
604782
def system(session):
    """"""
    system_test_path = os.path.join("tests", "system.py")
    system_test_folder_path = os.path.join("tests", "system")
    # Sanity check: Only run tests if the environment variable is set.
    if not os.environ.get("GOOGLE_APPLICATION_CREDENTIALS", ""):
        session.skip("Credentials must be set via environment variable")

    system_test_exists = os.path.exists(system_test_path)
    system_test_folder_exists = os.path.exists(system_test_folder_path)
    # Sanity check: only run tests if found.
    if not system_test_exists and not system_test_folder_exists:
        session.skip("System tests were not found")

    # Use pre-release gRPC for system tests.
    session.install("--pre", "grpcio")

    # Install all test dependencies, then install this package into the
    # virtualenv's dist-packages.
    session.install("mock", "pytest")
    for local_dep in LOCAL_DEPS:
        session.install("-e", local_dep)
    session.install("-e", "../test_utils/")
    session.install("-e", ".")

    # Run py.test against the system tests.
    if system_test_exists:
        session.run("py.test", "--quiet", system_test_path, *session.posargs)
    if system_test_folder_exists:
        session.run("py.test", "--quiet", system_test_folder_path, *session.posargs)
427521
function find_rule_local(gender, name, ruleset, match_whole_word, tags) {
        for (var i = 0; i < ruleset.length; i++) {
            var rule = ruleset[i];
            if (rule.tags) {
                var common_tags = [];
                for (var j = 0; j < rule.tags.length; j++) {
                    var tag = rule.tags[j];
                    if (!contains(tags, tag)) common_tags.push(tag);
                }
                if (!common_tags.length) continue;
            }
            if (rule.gender !== 'androgynous' && gender !== rule.gender)
                continue;

            name = name.toLowerCase();
            for (var j = 0; j < rule.test.length; j++) {
                var sample = rule.test[j];
                var test = match_whole_word ? name :
                    name.substr(name.length - sample.length);
                if (test === sample) return rule;
            }
        }
        return false;
    }
269520
def check_all_local_prep(self):
        """"""
        all_local_pp_chk = self.event['global']['all_local_prep'].isChecked()
        for buttons in self.event['local'].values():
            if buttons[1].isEnabled():
                buttons[1].setChecked(all_local_pp_chk)
534145
public static synchronized void spawnLocalHub(AbstractTestSession testSession) {
        LOGGER.entering(testSession.getPlatform());
        if (!isRunLocally()) {
            LOGGER.exiting();
            return;
        }

        setupToBootList();
        for (LocalServerComponent eachItem : toBoot) {
            try {
                eachItem.boot(testSession);
            } catch (Exception e) { //NOSONAR
                // If either the Grid or the Node failed to start at the first attempt then there is NO point in trying
                // to keep restarting it for every iteration. So lets log a severe message and exit the JVM.
                LOGGER.log(Level.SEVERE, e.getMessage(), e);
                System.exit(1);
            }
        }
        LOGGER.exiting();
    }
430293
def pass_local_client(
    method=None,
    clean=None,
    up_to_date=None,
    commit=None,
    ignore_std_streams=True,
    lock=None,
):
    """"""
    if method is None:
        return functools.partial(
            pass_local_client,
            clean=clean,
            up_to_date=up_to_date,
            commit=commit,
            ignore_std_streams=ignore_std_streams,
            lock=lock,
        )

    def new_func(*args, **kwargs):
        ctx = click.get_current_context()
        client = ctx.ensure_object(LocalClient)
        stack = contextlib.ExitStack()

        # Handle --isolation option:
        if get_git_isolation():
            client = stack.enter_context(client.worktree())

        transaction = client.transaction(
            clean=clean,
            up_to_date=up_to_date,
            commit=commit,
            ignore_std_streams=ignore_std_streams
        )
        stack.enter_context(transaction)

        if lock or (lock is None and commit):
            stack.enter_context(client.lock)

        with stack:
            result = ctx.invoke(method, client, *args, **kwargs)
        return result

    return functools.update_wrapper(new_func, method)
608511
def main():
    """"""
    try:
        opts, args = getopt.getopt(sys.argv[1:], "h:v", ["help", "nack=",
                                   "servers=", "queues="])
    except getopt.GetoptError as err:
        print str(err)
        usage()
        sys.exit()

    # defaults
    nack = 0.0
    verbose = False
    servers = "localhost:7712,localhost:7711"
    queues = "test"

    for o, a in opts:
        if o == "-v":
            verbose = True
        elif o in ("-h", "--help"):
            usage()
            sys.exit()
        elif o in ("--nack"):
            nack = float(a)
        elif o in ("--servers"):
            servers = a
        elif o in ("--queues"):
            queues = a
        else:
            assert False, "unhandled option"

    # prepare servers and queus for pydisque
    servers = servers.split(",")
    queues = queues.split(",")

    c = Client(servers)
    c.connect()

    while True:
        jobs = c.get_job(queues)
        for queue_name, job_id, job in jobs:
            rnd = random.random()

            # as this is a test processor, we don't do any validation on
            # the actual job body, so lets just pay attention to id's

            if rnd >= nack:
                print ">>> received job:", job_id
                c.ack_job(job_id)
            else:
                print ">>> bouncing job:", job_id
                c.nack_job(job_id)
846711
def play(quiet, session_file, shell, speed, prompt, commentecho):
    """"""
    run(
        session_file.readlines(),
        shell=shell,
        speed=speed,
        quiet=quiet,
        test_mode=TESTING,
        prompt_template=prompt,
        commentecho=commentecho,
    )
732471
public function main()
    {
        if ($this->codecoverage && !extension_loaded('xdebug')) {
            throw new Exception("PHPUnitTask depends on Xdebug being installed to gather code coverage information.");
        }

        $this->loadPHPUnit();

        if (class_exists('\PHPUnit_Framework_TestSuite')) {
            $suite = new PHPUnit_Framework_TestSuite('AllTests');
        } else {
            $suite = new \PHPUnit\Framework\TestSuite('AllTests');
        }

        $autoloadSave = spl_autoload_functions();

        if ($this->bootstrap) {
            include $this->bootstrap;
        }

        if ($this->configuration) {
            $arguments = $this->handlePHPUnitConfiguration($this->configuration);

            if ($arguments['backupGlobals'] === false) {
                $suite->setBackupGlobals(false);
            }

            if ($arguments['backupStaticAttributes'] === true) {
                $suite->setBackupStaticAttributes(true);
            }
        }

        if ($this->printsummary) {
            $fe = new FormatterElement();
            $fe->setParent($this);
            $fe->setType("summary");
            $fe->setUseFile(false);
            $this->formatters[] = $fe;
        }

        foreach ($this->batchtests as $batchTest) {
            $this->appendBatchTestToTestSuite($batchTest, $suite);
        }

        $this->execute($suite);

        if ($this->testfailed) {
            throw new BuildException($this->testfailuremessage);
        }

        $autoloadNew = spl_autoload_functions();
        if (is_array($autoloadNew)) {
            foreach ($autoloadNew as $autoload) {
                spl_autoload_unregister($autoload);
            }
        }

        if (is_array($autoloadSave)) {
            foreach ($autoloadSave as $autoload) {
                spl_autoload_register($autoload);
            }
        }
    }
562520
def execute_locally(self):
        """"""
        # Make script file #
        self.make_script()
        # Do it #
        with open(self.kwargs['out_file'], 'w') as handle:
            sh.python(self.script_path, _out=handle, _err=handle)
1263617
def local_data(path):
    """"""
    dirs = [os.path.join(path, item) for item in os.listdir(path)]
    names, sizes, files = zip(*[(dir.split('/')[-1], str(get_size(dir)),
                                 '##'.join([file for file in os.listdir(dir)]))
                                for dir in dirs])
    return zip(names, dirs, sizes, files)