##// END OF EJS Templates
test json_clean on integer subclasses
MinRK -
Show More
@@ -26,6 +26,9 b' from ..py3compat import unicode_to_str, str_to_bytes, iteritems'
26 26 #-----------------------------------------------------------------------------
27 27 # Test functions
28 28 #-----------------------------------------------------------------------------
29 class Int(int):
30 def __str__(self):
31 return 'Int(%i)' % self
29 32
30 33 def test():
31 34 # list of input/expected output. Use None for the expected output if it
@@ -48,6 +51,7 b' def test():'
48 51 # More exotic objects
49 52 ((x for x in range(3)), [0, 1, 2]),
50 53 (iter([1, 2]), [1, 2]),
54 (Int(5), 5),
51 55 ]
52 56
53 57 for val, jval in pairs:
General Comments 0
You need to be logged in to leave comments. Login now