From 7da3f1bc1bc97a33e43083282545aa7ca03408c0 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Sat, 23 Mar 2024 10:13:50 -0400 Subject: [PATCH] Update test_lazy_self_referential_modules to verify behavior of loaded function --- Lib/test/test_importlib/test_lazy.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_importlib/test_lazy.py b/Lib/test/test_importlib/test_lazy.py index a2a32e512cded1..4d2cc4eb62b67c 100644 --- a/Lib/test/test_importlib/test_lazy.py +++ b/Lib/test/test_importlib/test_lazy.py @@ -192,8 +192,9 @@ def test_lazy_self_referential_modules(self): sys.modules['json'] = module loader.exec_module(module) - # Trigger load with attribute lookup - module.loads + # Trigger load with attribute lookup, ensure expected behavior + test_load = module.loads('{}') + self.assertEqual(test_load, {}) if __name__ == '__main__':