mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
use assert[Not]In where appropriate
A patch from Dave Malcolm.
This commit is contained in:
parent
a69ba65fdc
commit
577473fe68
75 changed files with 471 additions and 454 deletions
|
@ -139,10 +139,10 @@ class HarmlessMixedComparison:
|
|||
self.assertFalse(() == me)
|
||||
self.assertTrue(() != me)
|
||||
|
||||
self.assertTrue(me in [1, 20, [], me])
|
||||
self.assertIn(me, [1, 20, [], me])
|
||||
self.assertFalse(me not in [1, 20, [], me])
|
||||
|
||||
self.assertTrue([] in [me, 1, 20, []])
|
||||
self.assertIn([], [me, 1, 20, []])
|
||||
self.assertFalse([] not in [me, 1, 20, []])
|
||||
|
||||
def test_harmful_mixed_comparison(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue