From c881be5d0bbddfc0ecb210c82716b5a8c276a14b Mon Sep 17 00:00:00 2001 From: "Jeong, YunWon" Date: Mon, 19 Jan 2026 00:23:45 +0900 Subject: [PATCH] gh-143959 make test_sys import _datetime inside the test --- Lib/test/test_sys.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index 1d8e908efb0572..b1b58161f0bba3 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -1,6 +1,5 @@ import builtins import codecs -import _datetime import gc import io import locale @@ -1566,6 +1565,8 @@ def test_default(self): self.assertEqual(sys.getsizeof(True, -1), size('') + self.longdigit) def test_objecttypes(self): + import _datetime + # check all types defined in Objects/ calcsize = struct.calcsize size = test.support.calcobjsize