Skip to content

Commit

Permalink
Merge branch 'main' into auto-update-lockfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
pp-mo authored Jan 2, 2025
2 parents e2146b9 + fe60f54 commit 198c287
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/refresh-lockfiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ on:

jobs:
refresh_lockfiles:
uses: scitools/workflows/.github/workflows/[email protected].0
uses: scitools/workflows/.github/workflows/[email protected].5
secrets: inherit
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

from unittest import mock

from iris import FUTURE as IRIS_FUTURE
import iris.coords

import iris_grib
Expand Down Expand Up @@ -81,8 +82,14 @@ def test_generating_process_warnings(self):
emit_warnings = convert_options.warn_on_unsupported
try:
convert_options.warn_on_unsupported = True
with mock.patch("warnings.warn") as warn:
product_definition_template_0(section_4(), metadata, rt_coord)
future_kwargs = {}
if hasattr(IRIS_FUTURE, "date_microseconds"):
# Avoid an additional awkward warning
# TODO: convert regime to pytest + tidy, but that is a lot of work !
future_kwargs["date_microseconds"] = True
with IRIS_FUTURE.context(**future_kwargs):
with mock.patch("warnings.warn") as warn:
product_definition_template_0(section_4(), metadata, rt_coord)
warn_msgs = [call[1][0] for call in warn.mock_calls]
expected = [
"Unable to translate type of generating process.",
Expand Down

0 comments on commit 198c287

Please sign in to comment.