Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
Ali Alshaarawy committed Nov 18, 2024
1 parent ba33789 commit 69c1e19
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions thunder/tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down

0 comments on commit 69c1e19

Please sign in to comment.