From c73b41210588d238a780ba877e6012f4ea353006 2013-11-25 19:48:31
From: MinRK <benjaminrk@gmail.com>
Date: 2013-11-25 19:48:31
Subject: [PATCH] test json_clean on integer subclasses
---

diff --git a/IPython/utils/tests/test_jsonutil.py b/IPython/utils/tests/test_jsonutil.py
index 66bb6a4..cdb5a7c 100644
--- a/IPython/utils/tests/test_jsonutil.py
+++ b/IPython/utils/tests/test_jsonutil.py
@@ -26,6 +26,9 @@ from ..py3compat import unicode_to_str, str_to_bytes, iteritems
 #-----------------------------------------------------------------------------
 # Test functions
 #-----------------------------------------------------------------------------
+class Int(int):
+    def __str__(self):
+        return 'Int(%i)' % self
 
 def test():
     # list of input/expected output.  Use None for the expected output if it
@@ -48,6 +51,7 @@ def test():
              # More exotic objects
              ((x for x in range(3)), [0, 1, 2]),
              (iter([1, 2]), [1, 2]),
+             (Int(5), 5),
              ]
     
     for val, jval in pairs: