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

tests: simplify createcopy test #11137

Merged
merged 1 commit into from
Oct 27, 2024

Conversation

bradh
Copy link
Contributor

@bradh bradh commented Oct 27, 2024

What does this PR do?

Simplifies one test, for multiple CreateCopy format checks.

What are related issues/pull requests?

At #11093 (comment) @rouault identified that the JPEG 2000 test case suppression was obsolete. This PR removes that obsolete code.

The change looks bigger than that, because of the required re-indent and slightly confusing diff. The only part that is actually removed is this:

            # print ('drv = %s, nBands = %d, datatype = %s' % (drv.ShortName, nBands, gdal.GetDataTypeName(datatype)))

            skip = False
            # FIXME: A few cases that crashes and should be investigated
            if drv.ShortName == "JPEG2000":
                if (nBands == 2 or nBands >= 5) or not (
                    datatype == gdal.GDT_Byte
                    or datatype == gdal.GDT_Int16
                    or datatype == gdal.GDT_UInt16
                ):
                    skip = True
            if skip is False:

Tasklist

  • Make sure code is correctly formatted (cf pre-commit configuration)
  • Add test case(s)
  • Add documentation
  • Updated Python API documentation (swig/include/python/docs/)
  • Review
  • Adjust for comments
  • All CI builds and checks have passed

Environment

Provide environment details, if relevant:

  • OS:
  • Compiler:

@coveralls
Copy link
Collaborator

Coverage Status

coverage: 69.461% (-0.002%) from 69.463%
when pulling 14bf346 on bradh:tests_simplify_createcopy_2024-10-27
into f05ae5c on OSGeo:master.

@rouault rouault merged commit 9ad3aff into OSGeo:master Oct 27, 2024
37 checks passed
@bradh bradh deleted the tests_simplify_createcopy_2024-10-27 branch October 27, 2024 09:27
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