def test_no_brokenpipeerror_message(pytester: Pytester) -> None:
    """Ensure that the broken pipe error message is suppressed.

    In some Python versions, it reaches sys.unraisablehook, in others
    a BrokenPipeError exception is propagated, but either way it prints
    to stderr on shutdown, so checking nothing is printed is enough.
    """
    popen = pytester.popen((*pytester._getpytestargs(), "--help"))
    popen.stdout.close()
    ret = popen.wait()
    assert popen.stderr.read() == b""
    assert ret == 1

    # Cleanup.
    popen.stderr.close()
Ensure that the broken pipe error message is suppressed.

    In some Python versions, it reaches sys.unraisablehook, in others
    a BrokenPipeError exception is propagated, but either way it prints
    to stderr on shutdown, so checking nothing is printed is enough.
    
testing/acceptance_test.py