Skip to content

Fix test_figure_savefig_geotiff due to package updates - #4874

Merged
seisman merged 1 commit into
mainfrom
test/fix-rioxarray
Sep 1, 2026
Merged

Fix test_figure_savefig_geotiff due to package updates#4874
seisman merged 1 commit into
mainfrom
test/fix-rioxarray

Conversation

@seisman

@seisman seisman commented Sep 1, 2026

Copy link
Copy Markdown
Member

As shown in https://github.com/GenericMappingTools/pygmt/actions/runs/33465293617/job/99723779477?pr=4868, the test test_figure_savefig_geotiff fails with the following error messages:

            # TIFF
            with pytest.warns(expected_warning=NotGeoreferencedWarning) as record:
                with rioxarray.open_rasterio(fname) as xds:
                    pass
>           assert len(record) == 1
E           assert 4 == 1
E            +  where 4 = len(WarningsChecker(record=True))

It seems rioxarray raises NotGeoreferencedWarning four times rather than once. There are no new releases of rioxarray or rasterio, so it's unclear which package causes this failure.

This PR fixes the issue by changing len(record) == 1 to len(record) > 1.

@seisman seisman added this to the 0.20.0 milestone Sep 1, 2026
@seisman seisman added maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog final review call This PR requires final review and approval from a second reviewer labels Sep 1, 2026
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Sep 1, 2026
@seisman
seisman merged commit 77ee7c5 into main Sep 1, 2026
25 checks passed
@seisman
seisman deleted the test/fix-rioxarray branch September 1, 2026 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants