[New-bugs-announce] [issue43841] [easy] test_collections: DeprecationWarning: Please use assertEqual instead
STINNER Victor
report at bugs.python.org
Wed Apr 14 07:09:23 EDT 2021
New submission from STINNER Victor <vstinner at python.org>:
Does someone want to propose a fix?
$ ./python -m test -v test_collections
(...)
test_issue_4920 (test.test_collections.TestCollectionABCs) ... /home/vstinner/python/master/Lib/test/test_collections.py:1518: DeprecationWarning: Please use assertEqual instead.
self.assertEquals(len(s), len(items) - 1)
ok
(...)
Tests result: SUCCESS
Warning introduced by PR 25209:
commit 453074c8daf996b1815a0cd2218f0dbf1801056c
Author: Stepan Sindelar <me at stevesindelar.cz>
Date: Thu Apr 8 01:31:55 2021 +0200
Fix broken test for MutableSet.pop() (GH-25209)
Changes the test to not assert concrete result of pop, but just that it
was an item from the set, and that the set shrunk by one.
----------
components: Tests
keywords: easy, newcomer friendly
messages: 391056
nosy: vstinner
priority: normal
severity: normal
status: open
title: [easy] test_collections: DeprecationWarning: Please use assertEqual instead
versions: Python 3.10
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43841>
_______________________________________
More information about the New-bugs-announce
mailing list