aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_structseq.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_structseq.py')
-rw-r--r--Lib/test/test_structseq.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_structseq.py b/Lib/test/test_structseq.py
index d0bc0bd7b61..9622151143c 100644
--- a/Lib/test/test_structseq.py
+++ b/Lib/test/test_structseq.py
@@ -42,7 +42,7 @@ class StructSeqTest(unittest.TestCase):
# os.stat() gives a complicated struct sequence.
st = os.stat(__file__)
rep = repr(st)
- self.assertTrue(rep.startswith("os.stat_result"))
+ self.assertStartsWith(rep, "os.stat_result")
self.assertIn("st_mode=", rep)
self.assertIn("st_ino=", rep)
self.assertIn("st_dev=", rep)
@@ -307,7 +307,7 @@ class StructSeqTest(unittest.TestCase):
self.assertEqual(t5.tm_mon, 2)
# named invisible fields
- self.assertTrue(hasattr(t, 'tm_zone'), f"{t} has no attribute 'tm_zone'")
+ self.assertHasAttr(t, 'tm_zone')
with self.assertRaisesRegex(AttributeError, 'readonly attribute'):
t.tm_zone = 'some other zone'
self.assertEqual(t2.tm_zone, t.tm_zone)