From e524c02e602e6323d539e033e306731326b66c7f Mon Sep 17 00:00:00 2001 From: Ali Alshaarawy Date: Mon, 18 Nov 2024 12:09:08 +0000 Subject: [PATCH] add test --- thunder/tests/test_core.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/thunder/tests/test_core.py b/thunder/tests/test_core.py index 29c491be08..14f64f0c42 100644 --- a/thunder/tests/test_core.py +++ b/thunder/tests/test_core.py @@ -662,6 +662,15 @@ def test_to_printable_not_collection(): assert inp is out +def test_to_printable_collection(): + from collections import namedtuple + MyTuple = namedtuple('MyTuple', ['x', 'y']) + + inps = (MyTuple("abc", "def")) + for inp in inps: + out = codeutils.to_printable(None, inp) + assert inp is out + # # Type promotion tests #