How to use the cwltest.utils.get_test_number_by_key function in cwltest

To help you get started, we’ve selected a few cwltest examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github common-workflow-language / cwltest / cwltest / __init__.py View on Github external
print(u"[%i] %s" % (i + 1, t.get("doc", "").strip()))

        return 0

    if args.n is not None or args.s is not None:
        ntest = []
        if args.n is not None:
            for s in args.n.split(","):
                sp = s.split("-")
                if len(sp) == 2:
                    ntest.extend(list(range(int(sp[0]) - 1, int(sp[1]))))
                else:
                    ntest.append(int(s) - 1)
        if args.s is not None:
            for s in args.s.split(","):
                test_number = get_test_number_by_key(tests, "short_name", s)
                if test_number:
                    ntest.append(test_number)
                else:
                    _logger.error('Test with short name "%s" not found ', s)
                    return 1
    else:
        ntest = list(range(0, len(tests)))

    total = 0
    with ThreadPoolExecutor(max_workers=args.j) as executor:
        jobs = [
            executor.submit(
                run_test,
                args,
                tests[i],
                i + 1,