##// END OF EJS Templates
Add failing test for unbound method repr on Python 3
Thomas Kluyver -
Show More
@@ -45,6 +45,10 b' class MyDict(dict):'
45 def _repr_pretty_(self, p, cycle):
45 def _repr_pretty_(self, p, cycle):
46 p.text("MyDict(...)")
46 p.text("MyDict(...)")
47
47
48 class MyObj(object):
49 def somemethod(self):
50 pass
51
48
52
49 class Dummy1(object):
53 class Dummy1(object):
50 def _repr_pretty_(self, p, cycle):
54 def _repr_pretty_(self, p, cycle):
@@ -222,3 +226,6 b' def test_long_dict():'
222 last2 = p.rsplit('\n', 2)[-2:]
226 last2 = p.rsplit('\n', 2)[-2:]
223 nt.assert_equal(last2, [' 999: 999,', ' ...}'])
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