def METHOD_NAME(self, signo):
    # Start bash process printing its pid and sleeping. The short sleep
    # before printing the pid avoids a race when we got the pid before
    # py-watch started to wait for the child.
    p = subprocess.Popen(
        [sys.executable, 'py-watch', '10', 'bash', '-c',
            'sleep 0.5; echo $$; sleep 10'],
        stdout=subprocess.PIPE)
    # Wait until the underlying bash process prints its pid.
    for src, data in cmdutils.receive(p):
        if src == cmdutils.OUT:
            child_pid = int(data)
            break
    # Terminate py-watch, and check its exit code.
    p.send_signal(signo)
    assert p.wait() == 128 + signo
    # Check that the child process was terminated.
    with pytest.raises(OSError) as e:
        assert os.kill(child_pid, 0)
    assert e.value.errno == errno.ESRCH