def METHOD_NAME():
    """
    This is safe to have as a unit test since we aren't going to actually
    try to read or write. We want to ensure that we are raising a
    TypeError. Python 3's open() builtin will treat the booleans as file
    descriptor numbers and try to open stdin/stdout. We also want to test
    fd 2 which is stderr.
    """
    for invalid_fn in (False, True, 0, 1, 2):
        try:
            with salt.utils.files.fopen(invalid_fn):
                pass
        except TypeError:
            # This is expected. We aren't using an assertRaises here
            # because we want to ensure that if we did somehow open the
            # filehandle, that it doesn't remain open.
            pass
        else:
            # We probably won't even get this far if we actually opened
            # stdin/stdout as a file descriptor. It is likely to cause the
            # integration suite to die since, news flash, closing
            # stdin/stdout/stderr is usually not a wise thing to do in the
            # middle of a program's execution.
            pytest.fail(
                "fopen() should have been prevented from opening a file "
                "using {} as the filename".format(invalid_fn)
            )