4ab211d6dd50c043cacd24db93a6bc64cfdb9ed5,tools/validate_runtests_log.py,,,#,24

Before Change


            found_it = True
            sys.stdin.readline()   // skip the next one
            line = sys.stdin.readline()
            if "OK" in line:
                status = True
            break

    if found_it:
        // did it errored or failed?

After Change


                     "fast": 17738}

    // read in the log, parse for the pytest printout
    r1 = re.compile("(?P<num_failed>\d+) failed, (?P<num_passed>\d+) passed,.* in (?P<time>\d+\S+)")
    r2 = re.compile("(?P<num_passed>\d+) passed,.* in (?P<time>\d+\S+)")

    found_it = False
    while True:
        line = sys.stdin.readline()
        if not line:
            break
        m = r1.search(line)
        if not m:
            m = r2.search(line)
        if m:
            found_it = True
            break

    if found_it:
        passed = int(m.group("num_passed"))
        try:
            failed = int(m.group("num_failed"))
        except IndexError:
            failed = 0

        if failed:
            print("*** Looks like some tests failed.")
            sys.exit(-1)

        // now check that the number of tests run is reasonable
        expected = expected_size[testmode]
        actual = passed + failed
        if actual < expected:
            print("*** Too few tests: expected %s, run %s" % (expected, actual))
            sys.exit(1)
        else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: scipy/scipy
Commit Name: 4ab211d6dd50c043cacd24db93a6bc64cfdb9ed5
Time: 2017-07-21
Author: pav@iki.fi
File Name: tools/validate_runtests_log.py
Class Name:
Method Name:


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 332c35bac50551d9fcea0a78c6730d53ed063653
Time: 2017-06-28
Author: valentina.zantedeschi@ibm.com
File Name: src/classifiers/classifier.py
Class Name: Classifier
Method Name: parse_defences


Project Name: ActiveState/code
Commit Name: 8e2528c312791c2c56c8bca365669e06ab698a88
Time: 2017-11-28
Author: mn@mn.heuthesd
File Name: recipes/Python/576621_Dump_Informix_schema_to_text/recipe-576621.py
Class Name:
Method Name: