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

Use TestCase.assertTrue() instead of TestCase.assert_() #575

Merged
merged 1 commit into from
Jul 13, 2023

Conversation

musicinmybrain
Copy link
Contributor

@musicinmybrain musicinmybrain commented Jul 13, 2023

The assert_() method is deprecated and will be removed in Python 3.12.

$ python3.11
Python 3.11.4 (main, Jun  7 2023, 00:00:00) [GCC 13.1.1 20230511 (Red Hat 13.1.1-2)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from unittest import TestCase
>>> TestCase.assert_
<function TestCase._deprecate.<locals>.deprecated_func at 0x7fc1cf20eac0>
$ python3.12
Python 3.12.0b3 (main, Jun 21 2023, 00:00:00) [GCC 13.1.1 20230614 (Red Hat 13.1.1-4)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from unittest import TestCase
>>> TestCase.assert_
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: type object 'TestCase' has no attribute 'assert_'. Did you mean: 'assertIn'?

The assert_() method is deprecated and will be removed in Python 3.12.
Copy link
Contributor

@Natim Natim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 🙏

@Natim Natim merged commit 3accf32 into Cornices:master Jul 13, 2023
0 of 7 checks passed
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.

2 participants