[issue43825] [easy] test_collections: DeprecationWarning: Please use assertEqual instead

2021-04-14 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks Karthikeyan! Usually, I let core developers to merge their own PRs, but 
I created multiple "easy" issues about warnings in tests, and so I merged 
directly your fix to prevent contributors to propose similar fixes ;-)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43825] [easy] test_collections: DeprecationWarning: Please use assertEqual instead

2021-04-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset b8509ffa82d393d9d4a0f5520edca057978bbd86 by Karthikeyan 
Singaravelan in branch 'master':
bpo-43825: Fix deprecation warnings in test_cmd_line and test_collections 
(GH-25380)
https://github.com/python/cpython/commit/b8509ffa82d393d9d4a0f5520edca057978bbd86


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43825] [easy] test_collections: DeprecationWarning: Please use assertEqual instead

2021-04-14 Thread STINNER Victor


STINNER Victor  added the comment:

Serhiy closed my issue bpo-43841 as a duplicate of this one. My message:

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 
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.

--
nosy: +vstinner
title: Deprecation warnings in test cases -> [easy] test_collections: 
DeprecationWarning: Please use assertEqual instead

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com