@@ -138,6 +138,14 @@ def setUp(self):
138
138
self .repl .push (" def spam(self, a, b, c):\n " , False )
139
139
self .repl .push (" pass\n " , False )
140
140
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 )
141
149
self .repl .push ("o = Spam()\n " , False )
142
150
self .repl .push ("\n " , False )
143
151
@@ -207,6 +215,13 @@ def test_nonexistent_name(self):
207
215
self .set_input_line ("spamspamspam(" )
208
216
self .assertFalse (self .repl .get_args ())
209
217
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
+
210
225
211
226
class TestGetSource (unittest .TestCase ):
212
227
def setUp (self ):
0 commit comments