<br clear="all"><div>I can't figure out why ipdb is not displaying stout properly.</div><div>I'm trying to debug why a test is failing and so I attempt to use ipdb debugger.</div><div><br></div><div>For some reason my Input seems to be accepted, but the STOUT is not displayed until I (c)ontinue.</div>
<div><br></div><div>Is this something broken in ipdb?</div><div>It makes it very difficult to debug a program.</div><div><br></div><div>Below is an example ipdb session, notice how I attempt to display the values of the attributes with:</div>
<div>user.is_authenticated() </div><div>user_profile.reputation </div><div>user.is_superuser </div><div><br></div><div>The results are not displayed until 'begin captured stdout '</div><div><br></div><div><br></div>
<div>In [13]: !python manage.py test </div><div>Creating test database... </div><div>< SNIP remove loading tables > </div><div>nosetests </div><div>...E..> /Users/Bryan/work/APP/forum/auth.py(93)can_retag_questions() </div>
<div> 92 import ipdb; ipdb.set_trace() </div><div>---> 93 return user.is_authenticated() and ( </div><div> 94 RETAG_OTHER_QUESTIONS <= user_profile.reputation < EDIT_OTHER_POSTS or </div>
<div> </div><div>user.is_authenticated() </div><div>user_profile.reputation </div><div>user.is_superuser </div><div>c </div><div>F> /Users/Bryan/work/APP/forum/auth.py(93)can_retag_questions() </div><div> 92 import ipdb; ipdb.set_trace() </div>
<div>---> 93 return user.is_authenticated() and ( </div><div> 94 RETAG_OTHER_QUESTIONS <= user_profile.reputation < EDIT_OTHER_POSTS or </div><div> </div><div>c </div><div>.....EE...... </div>
<div><SNIP more failed tests> </div><div>====================================================================== </div><div>FAIL: test_can_retag_questions (APP.forum.tests.test_views.AuthorizationFunctionsTestCase) </div>
<div>---------------------------------------------------------------------- </div><div>Traceback (most recent call last): </div><div> File "/Users/Bryan/work/APP/../APP/forum/tests/test_views.py", line 71, in test_can_retag_questions </div>
<div> self.assertTrue(auth.can_retag_questions(user)) </div><div>AssertionError: </div><div>-------------------- >> begin captured stdout << --------------------- </div><div>ipdb> True </div><div>ipdb> 4001 </div>
<div>ipdb> False </div><div>ipdb> </div><div>--------------------- >> end captured stdout << ---------------------- </div><div> </div><div>---------------------------------------------------------------------- </div>
<div>Ran 20 tests in 78.032s </div><div> </div><div>FAILED (errors=3, failures=1) </div><div>Destroying test database... </div><div> </div><div>In [14]: </div><div><br></div><div><br></div><div>Here is the actual test I'm trying to run: </div>
<div> def can_retag_questions(user): </div><div> """Determines if a User can retag Questions.""" </div><div> user_profile = user.get_profile() </div><div> import ipdb; ipdb.set_trace() </div>
<div> return user.is_authenticated() and ( </div><div> RETAG_OTHER_QUESTIONS <= user_profile.reputation < EDIT_OTHER_POSTS or </div><div> user.is_superuser) </div><div><br></div><div>
I've also tried to use pdb, but that doesn't display anything. I see my test progress ....<stops> , and then nothing and not responsive to keyboard input.</div><div><br></div><div>Is this a problem with readline?</div>
-- <br>The best marketing related articles are at <a href="http://www.InstantDirectMarketing.com">http://www.InstantDirectMarketing.com</a><br>