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