850fa9913b2f24729cd4c58b4037697ab028c52a,bokeh/command/subcommands/tests/test_serve.py,,test_actual_port_printed_out,#,227

Before Change


            line = p.stdout.readline()
            print("child stdout>", line)
            m = pat.search(line.decode())
            if m is not None:
                break
        else:
            pytest.fail("no matching log line in process output")
        port = int(m.group(1))
        assert port > 0

After Change


    with run_bokeh_serve(["--port", "0"]) as p:
        flags = fcntl(p.stdout, F_GETFL)
        fcntl(p.stdout, F_SETFL, flags | O_NONBLOCK)
        sleep(2)
        o = read(p.stdout.fileno(), 100*1024)
        m = pat.search(o.decode())
        if m is None:
            pytest.fail("no matching log line in process output")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: bokeh/bokeh
Commit Name: 850fa9913b2f24729cd4c58b4037697ab028c52a
Time: 2018-06-04
Author: bryanv@anaconda.com
File Name: bokeh/command/subcommands/tests/test_serve.py
Class Name:
Method Name: test_actual_port_printed_out


Project Name: PaddlePaddle/edl
Commit Name: ed9fb224f3aa4336d066cbbe4b9abf26b24f8535
Time: 2020-09-02
Author: weibao.gong@gmail.com
File Name: python/edl/utils/watcher.py
Class Name: Watcher
Method Name: _watcher


Project Name: DexterInd/GoPiGo3
Commit Name: 1048bd3eefe8c9f09c90a424de0e055048ac49e4
Time: 2017-06-15
Author: dxtrindustries@gmail.com
File Name: Software/Python/easygopigo3.py
Class Name: UltraSonicSensor
Method Name: read_mm