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/test_evol.py: port assertions to python3.12. #737

Open
wants to merge 1 commit into
base: ete4
Choose a base branch
from

Conversation

emollier
Copy link

As first identified in Debian bug #1058334 affecting ete3, since introduction of Python 3.12, a number of tests are failing with errors looking like:

AttributeError: 'Test_Coretype_ArrayTable' object has no attribute 'assert_'. Did you mean: 'assertIn'?

This is because the newer version of the unittest module of the standard library removed the use of deprecated assert_ function for other ones more meaningful, as documented in Python 3.12 novelties. It appears that there are still a few assert_ occurrences remaining in ete4 source code, so this patch modernizes them.

As first identified in [Debian bug #1058334] affecting ete3, since
introduction of Python 3.12, a number of tests are failing with errors
looking like:

	AttributeError: 'Test_Coretype_ArrayTable' object has no attribute 'assert_'. Did you mean: 'assertIn'?

This is because the newer version of the unittest module of the
standard library removed the use of deprecated assert_ function for
other ones more meaningful, as documented in [Python 3.12 novelties].
It appears that there are still a few assert_ occurrences remaining in
ete4 source code, so this patch modernizes them.

[Debian bug #1058334]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1058334
[Python 3.12 novelties]: https://docs.python.org/3/whatsnew/3.12.html#id3

Signed-off-by: Étienne Mollier <emollier@debian.org>
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.

1 participant