Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update gdaldataset.cpp #9114

Merged
merged 3 commits into from
Jan 21, 2024
Merged

Update gdaldataset.cpp #9114

merged 3 commits into from
Jan 21, 2024

Conversation

jidanni
Copy link
Contributor

@jidanni jidanni commented Jan 21, 2024

For #9009.

@rouault
Copy link
Member

rouault commented Jan 21, 2024

Some tests have to be adapted for that change of error message too:

______________________________ test_basic_test_5 _______________________________

    def test_basic_test_5():

        with gdal.quiet_errors():

            ds = gdal.Open("data/doctype.xml", gdal.GA_ReadOnly)

        last_error = gdal.GetLastErrorMsg()

        expected = "`data/doctype.xml' not recognized as a supported file format"

        if ds is None and expected in last_error:

            return

>       pytest.fail()

E       Failed

/home/travis/build/OSGeo/gdal/build/autotest/gcore/basic_test.py:123: Failed

______________________________ test_ogrinfo_if_ko ______________________________

ogrinfo_path = '/home/travis/build/OSGeo/gdal/build/apps/ogrinfo'

    @pytest.mark.require_driver("GeoJSON")

    def test_ogrinfo_if_ko(ogrinfo_path):

    

        (_, err) = gdaltest.runexternal_out_and_err(

            ogrinfo_path + " -if GeoJSON ../ogr/data/gpkg/2d_envelope.gpkg"

        )

>       assert "not recognized as a supported file format" in err

E       assert 'not recognized as a supported file format' in "ERROR 4: `../ogr/data/gpkg/2d_envelope.gpkg' not recognized as being in a supported file format.\nogrinfo failed - unable to open '../ogr/data/gpkg/2d_envelope.gpkg'.\n\nERROR ret code = 1"

/home/travis/build/OSGeo/gdal/build/autotest/utilities/test_ogrinfo.py:751: AssertionError

@rouault
Copy link
Member

rouault commented Jan 21, 2024

Some tests have to be adapted for that change of error message too:

I've added an extra commit to the branch of your pull request fo fix those tests

@coveralls
Copy link
Collaborator

Coverage Status

coverage: 68.751% (-0.003%) from 68.754%
when pulling ecb2253 on jidanni:patch-21
into fc0ec2b on OSGeo:master.

@rouault rouault merged commit 9cc12ba into OSGeo:master Jan 21, 2024
30 of 32 checks passed
@jidanni jidanni deleted the patch-21 branch January 22, 2024 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants