Show More
@@ -45,6 +45,10 b' class MyDict(dict):' | |||
|
45 | 45 | def _repr_pretty_(self, p, cycle): |
|
46 | 46 | p.text("MyDict(...)") |
|
47 | 47 | |
|
48 | class MyObj(object): | |
|
49 | def somemethod(self): | |
|
50 | pass | |
|
51 | ||
|
48 | 52 | |
|
49 | 53 | class Dummy1(object): |
|
50 | 54 | def _repr_pretty_(self, p, cycle): |
@@ -222,3 +226,6 b' def test_long_dict():' | |||
|
222 | 226 | last2 = p.rsplit('\n', 2)[-2:] |
|
223 | 227 | nt.assert_equal(last2, [' 999: 999,', ' ...}']) |
|
224 | 228 | |
|
229 | def test_unbound_method(): | |
|
230 | output = pretty.pretty(MyObj.somemethod) | |
|
231 | nt.assert_in('MyObj.somemethod', output) No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now