Skip to content

Commit e996c40

Browse files
committed
test(structseq): use immutable type check
1 parent a5a15b2 commit e996c40

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎Lib/test/test_structseq.py‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import textwrap
77
import time
88
import unittest
9+
from test import support
910
from test.support import script_helper
1011

1112

@@ -366,9 +367,7 @@ def test_replace_gc_tracked(self):
366367
self.assertTrue(gc.is_tracked(replaced_struct))
367368

368369
def test_struct_time_type_immutable(self):
369-
t = time.gmtime()
370-
with self.assertRaisesRegex(TypeError, "immutable type"):
371-
type(t).refcycle = t
370+
support.check_immutable_type(self, type(time.gmtime()))
372371

373372
if __name__ == "__main__":
374373
unittest.main()

0 commit comments

Comments
 (0)