code: def test_download_resource_file__exception(
      urlretrieve_mock, tmp_path
  ):
      def dummy_urlretrieve(url, local_path):
          local_path.touch()
          raise URLError("Test")
  
      urlretrieve_mock.side_effect = dummy_urlretrieve
      with pytest.raises(URLError):
          _download_resource_file(
              file_url="test_url",
              short_name="test_file.txt",
              directory=str(tmp_path),
              verbose=False,
              sha256="test",
          )
      urlretrieve_mock.assert_called_with(
          "test_url", tmp_path / "test_file.txt.part"
      )
      assert not tmp_path.joinpath("test_file.txt.part").exists()
      assert not tmp_path.joinpath("test_file.txt").exists()
  
file_path: pyproj/test/test_sync.py
imports: from datetime import datetime, timedelta
  from unittest.mock import MagicMock, patch
  from urllib.error import URLError
  import pytest
  from pyproj.aoi import BBox
  from pyproj.sync import _download_resource_file, _load_grid_geojson, _sha256sum, get_transform_grid_list
label_desc: Use image node_id 11 for calling a global function with example usage: test_download_resource_file__exception(urlretrieve_mock, tmp_path) without return types