summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_set.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2025-05-22 10:42:50 (GMT)
committerGitHub <noreply@github.com>2025-05-22 10:42:50 (GMT)
commitdb98e0bb127c469842dc119d23e5daacd23862cc (patch)
tree5628e04625c93f2e5bde25aa29dedb3c154a0dec /Lib/test/test_set.py
parentd5f7e80d4407655919b32bbd5746b23af174bc5b (diff)
downloadcpython-db98e0bb127c469842dc119d23e5daacd23862cc.zip
cpython-db98e0bb127c469842dc119d23e5daacd23862cc.tar.gz
cpython-db98e0bb127c469842dc119d23e5daacd23862cc.tar.bz2
[3.14] gh-71339: Use new assertion methods in tests (GH-129046) (GH-134498)
(cherry picked from commit 2602d8ae981c4bae1cada2c174b367d97f712efb) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Lib/test/test_set.py')
-rw-r--r--Lib/test/test_set.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_set.py b/Lib/test/test_set.py
index c01e323..c0df950 100644
--- a/Lib/test/test_set.py
+++ b/Lib/test/test_set.py
@@ -237,7 +237,7 @@ class TestJointOps:
if type(self.s) not in (set, frozenset):
self.assertEqual(self.s.x, dup.x)
self.assertEqual(self.s.z, dup.z)
- self.assertFalse(hasattr(self.s, 'y'))
+ self.assertNotHasAttr(self.s, 'y')
del self.s.x, self.s.z
def test_iterator_pickling(self):
@@ -876,8 +876,8 @@ class TestBasicOps:
def check_repr_against_values(self):
text = repr(self.set)
- self.assertTrue(text.startswith('{'))
- self.assertTrue(text.endswith('}'))
+ self.assertStartsWith(text, '{')
+ self.assertEndsWith(text, '}')
result = text[1:-1].split(', ')
result.sort()