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

[MRG] Fix AttributeError tests for Python 3.11 #754

Merged
merged 1 commit into from Mar 17, 2022

Conversation

musicinmybrain
Copy link
Contributor

@musicinmybrain musicinmybrain commented Mar 16, 2022

In Python 3.11, the messages associated with some AttributeErrors have changed. Adjust the message patterns in affected tests to accommodate both new and old message styles.

See #753 for details.

Reference issue

Fixes #753.

Tasks

  • Unit tests added that reproduce issue or prove feature is working Not applicable: existing tests were failing on Python 3.11, and adding a Python 3.11 pre-release to CI is out of scope for me.
  • Fix or feature added Test fix only; no change to installed library
  • Documentation and examples updated (if relevant) Not needed, I think.
  • Unit tests passing and coverage at 100% after adding fix/feature Waiting for CI run; should be as good as it was before!
  • Type annotations updated and passing with mypy No types changed
  • Apps updated and tested (if relevant) Not relevant

In Python 3.11, the messages associated with some AttributeErrors have
changed. Adjust the message patterns in affected tests to accommodate
both new and old message styles.

Fixes pydicom#753.
@musicinmybrain musicinmybrain changed the title [WIP] Fix AttributeError tests for Python 3.11 [MRG] Fix AttributeError tests for Python 3.11 Mar 16, 2022
@musicinmybrain
Copy link
Contributor Author

I have tested this with a provisional Python 3.11 package in the Fedora build infrastructure, and confirm that it fixes #753.

@codecov
Copy link

codecov bot commented Mar 16, 2022

Codecov Report

Merging #754 (2126bd9) into master (d945d13) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##            master      #754   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           28        28           
  Lines         8648      8648           
=========================================
  Hits          8648      8648           

@musicinmybrain
Copy link
Contributor Author

It doesn’t seem like the CI failures could be related to this PR. Are they expected?

@scaramallion
Copy link
Member

They look like failures due to upstream pydicom changes, so don't worry about it.

@scaramallion scaramallion merged commit da0b39f into pydicom:master Mar 17, 2022
@scaramallion
Copy link
Member

Also, thanks!

@musicinmybrain
Copy link
Contributor Author

Thanks for the quick review!

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.

Tests expecting an AttributeError fail on Python 3.11
3 participants