@@ -138,6 +138,14 @@ def setUp(self):
138138 self .repl .push (" def spam(self, a, b, c):\n " , False )
139139 self .repl .push (" pass\n " , False )
140140 self .repl .push ("\n " , False )
141+ self .repl .push ("class SpammitySpam(object):\n " , False )
142+ self .repl .push (" def __init__(self, a, b, c):\n " , False )
143+ self .repl .push (" pass\n " , False )
144+ self .repl .push ("\n " , False )
145+ self .repl .push ("class WonderfulSpam(object):\n " , False )
146+ self .repl .push (" def __new__(self, a, b, c):\n " , False )
147+ self .repl .push (" pass\n " , False )
148+ self .repl .push ("\n " , False )
141149 self .repl .push ("o = Spam()\n " , False )
142150 self .repl .push ("\n " , False )
143151
@@ -207,6 +215,13 @@ def test_nonexistent_name(self):
207215 self .set_input_line ("spamspamspam(" )
208216 self .assertFalse (self .repl .get_args ())
209217
218+ def test_issue572 (self ):
219+ self .set_input_line ("SpammitySpam(" )
220+ self .assertTrue (self .repl .get_args ())
221+
222+ self .set_input_line ("WonderfulSpam(" )
223+ self .assertTrue (self .repl .get_args ())
224+
210225
211226class TestGetSource (unittest .TestCase ):
212227 def setUp (self ):
0 commit comments