def METHOD_NAME():
    """An event which cannot write itself onto an output stream
    (such as because it doesn't have a data field set)
    should write an error. Check that it does so."""
    ew = EventWriter(sys.stdout, sys.stderr)
    e = Event()
    with pytest.raises(ValueError) as excinfo:
        ew.write_event(e)
    assert str(excinfo.value) == "Events must have at least the data field set to be written to XML."