def METHOD_NAME(test_filename):
    """Tests for a loader that raises an exception."""
    class FailingLoader:
        extensions = ["test"]
        @staticmethod
        def load_file(path, options, record=None):
            raise Exception("test error")
    with registered_type(FailingLoader):
        model = Loader.get_global_ptr().load_sync(test_filename, LoaderOptions(LoaderOptions.LF_no_cache))
        assert model is None