Show More
@@ -678,7 +678,7 b' def _dict_pprinter_factory(start, end, basetype=None):' | |||||
678 | def _super_pprint(obj, p, cycle): |
|
678 | def _super_pprint(obj, p, cycle): | |
679 | """The pprint for the super type.""" |
|
679 | """The pprint for the super type.""" | |
680 | p.begin_group(8, '<super: ') |
|
680 | p.begin_group(8, '<super: ') | |
681 |
p.pretty(obj.__s |
|
681 | p.pretty(obj.__thisclass__) | |
682 | p.text(',') |
|
682 | p.text(',') | |
683 | p.breakable() |
|
683 | p.breakable() | |
684 | p.pretty(obj.__self__) |
|
684 | p.pretty(obj.__self__) |
@@ -182,3 +182,18 b' def test_really_bad_repr():' | |||||
182 | nt.assert_in("BadException: unknown", output) |
|
182 | nt.assert_in("BadException: unknown", output) | |
183 | nt.assert_in("unknown type", output) |
|
183 | nt.assert_in("unknown type", output) | |
184 |
|
184 | |||
|
185 | ||||
|
186 | class SA(object): | |||
|
187 | pass | |||
|
188 | ||||
|
189 | class SB(SA): | |||
|
190 | pass | |||
|
191 | ||||
|
192 | def test_super_repr(): | |||
|
193 | output = pretty.pretty(super(SA)) | |||
|
194 | nt.assert_in("SA", output) | |||
|
195 | ||||
|
196 | sb = SB() | |||
|
197 | output = pretty.pretty(super(SA, sb)) | |||
|
198 | nt.assert_in("SA", output) | |||
|
199 | No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now