def METHOD_NAME():
    # First test without a specified encoding; we should be able to write
    # arbitrary unicode strings
    f1 = FakeTTY()
    assert f1.isatty()
    f1.write("☃")
    assert f1.getvalue() == "☃"
    # Now test an ASCII-only TTY--it should raise a UnicodeEncodeError when
    # trying to write a string containing non-ASCII characters
    f2 = FakeTTY("ascii")
    assert f2.isatty()
    assert f2.__class__.__name__ == "AsciiFakeTTY"
    assert pytest.raises(UnicodeEncodeError, f2.write, "☃")
    assert f2.getvalue() == ""