This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: [easy] test_collections: DeprecationWarning: Please use assertEqual instead
Type: Stage: resolved
Components: Tests Versions: Python 3.10
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Deprecation warnings in test_cmd_line and test_collections
View: 43825
Assigned To: Nosy List: vstinner, xtreak
Priority: normal Keywords: easy, newcomer friendly

Created on 2021-04-14 11:09 by vstinner, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg391056 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-04-14 11:09
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@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.
msg391061 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2021-04-14 11:27
This is a duplicate of https://bugs.python.org/issue43825.
History
Date User Action Args
2022-04-11 14:59:44adminsetgithub: 88007
2021-04-14 11:32:31serhiy.storchakasetstatus: open -> closed
superseder: Deprecation warnings in test_cmd_line and test_collections
resolution: duplicate
stage: resolved
2021-04-14 11:27:46xtreaksetnosy: + xtreak
messages: + msg391061
2021-04-14 11:09:23vstinnercreate