From a17451f9b9e59df88abad6c86a099d72e6ceb040 2014-02-03 18:24:35 From: Thomas Kluyver Date: 2014-02-03 18:24:35 Subject: [PATCH] Add failing test for pretty repr of super() objects --- diff --git a/IPython/lib/tests/test_pretty.py b/IPython/lib/tests/test_pretty.py index 0df3448..009512d 100644 --- a/IPython/lib/tests/test_pretty.py +++ b/IPython/lib/tests/test_pretty.py @@ -181,4 +181,19 @@ def test_really_bad_repr(): nt.assert_in("failed", output) nt.assert_in("BadException: unknown", output) nt.assert_in("unknown type", output) + + +class SA(object): + pass + +class SB(SA): + pass + +def test_super_repr(): + output = pretty.pretty(super(SA)) + nt.assert_in("SA", output) + + sb = SB() + output = pretty.pretty(super(SA, sb)) + nt.assert_in("SA", output) \ No newline at end of file