def METHOD_NAME(self):
    h, _ = windows_utils.pipe(overlapped=(True, True))
    _winapi.CloseHandle(_)
    p = windows_utils.PipeHandle(h)
    self.assertEqual(p.fileno(), h)
    self.assertEqual(p.handle, h)
    # check garbage collection of p closes handle
    with warnings.catch_warnings():
        warnings.filterwarnings("ignore", "",  ResourceWarning)
        del p
        support.gc_collect()
    try:
        _winapi.CloseHandle(h)
    except OSError as e:
        self.assertEqual(e.winerror, 6)     # ERROR_INVALID_HANDLE
    else:
        raise RuntimeError('expected ERROR_INVALID_HANDLE')