def METHOD_NAME(self) -> None:
    doc = Document()
    handler = bahc.CodeHandler(source="# This script does nothing", filename="path/to/test_filename")
    handler.modify_document(doc)
    if handler.failed:
        raise RuntimeError(handler.error)
    assert not doc.roots