You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run nose2 -D, it will cause pdb to be started when a test fails, which is on a line that has a call to "self.assertTrue" or other, however, the bit of code that I want to debug - by setting a breakpoint on it - is called earlier. I've tried setting the breakpoint and then issuing the pdb command run/restart, but I get the following error:
FAILED (failures=1)
ERROR:nose2.main:Internal Error
Traceback (most recent call last):
File "/home/mond/.local/lib/python3.5/site-packages/nose2/main.py", line 271, in runTests
self.result = runner.run(self.test)
File "/home/mond/.local/lib/python3.5/site-packages/nose2/runner.py", line 53, in run
executor(test, result)
File "/home/mond/.local/lib/python3.5/site-packages/nose2/runner.py", line 41, in <lambda>
executor = lambda suite, result: suite(result)
File "/usr/lib/python3.5/unittest/suite.py", line 84, in __call__
return self.run(*args, **kwds)
File "/usr/lib/python3.5/unittest/suite.py", line 122, in run
test(result)
File "/usr/lib/python3.5/unittest/suite.py", line 84, in __call__
return self.run(*args, **kwds)
File "/usr/lib/python3.5/unittest/suite.py", line 122, in run
test(result)
File "/usr/lib/python3.5/unittest/suite.py", line 84, in __call__
return self.run(*args, **kwds)
File "/usr/lib/python3.5/unittest/suite.py", line 122, in run
test(result)
File "/usr/lib/python3.5/unittest/case.py", line 648, in __call__
return self.run(*args, **kwds)
File "/usr/lib/python3.5/unittest/case.py", line 608, in run
self._feedErrorsToResult(result, outcome.errors)
File "/usr/lib/python3.5/unittest/case.py", line 536, in _feedErrorsToResult
result.addFailure(test, exc_info)
File "/home/mond/.local/lib/python3.5/site-packages/nose2/result.py", line 69, in addFailure
self.session.hooks.testOutcome(event)
File "/home/mond/.local/lib/python3.5/site-packages/nose2/events.py", line 224, in __call__
result = getattr(plugin, self.method)(event)
File "/home/mond/.local/lib/python3.5/site-packages/nose2/plugins/debugger.py", line 58, in testOutcome
self.pdb.post_mortem(tb)
File "/usr/lib/python3.5/pdb.py", line 1595, in post_mortem
p.interaction(None, t)
File "/usr/lib/python3.5/pdb.py", line 346, in interaction
self._cmdloop()
File "/usr/lib/python3.5/pdb.py", line 319, in _cmdloop
self.cmdloop()
File "/usr/lib/python3.5/cmd.py", line 138, in cmdloop
stop = self.onecmd(line)
File "/usr/lib/python3.5/pdb.py", line 412, in onecmd
return cmd.Cmd.onecmd(self, line)
File "/usr/lib/python3.5/cmd.py", line 217, in onecmd
return func(arg)
File "/usr/lib/python3.5/pdb.py", line 1022, in do_run
raise Restart
pdb.Restart
Internal Error: runTests aborted:
How can I set a breakpoint and re-run? I could run the test file in pdb, create the testcase class, etc but I wondered if there was an easier way.
Using the pdb command jump doesn't work because it can only jump around in the bottom stack frame, which is inside nose not my code.
And using a .pdbrc to set the breakpoint doesn't work either. The text that says a breakpoint has been set is printed out but it still invokes pdb on the assertion failure and not the earlier code which has the breakpoint on it.
Many thanks,
Derek
The text was updated successfully, but these errors were encountered:
Hi,
When I run nose2 -D, it will cause pdb to be started when a test fails, which is on a line that has a call to "self.assertTrue" or other, however, the bit of code that I want to debug - by setting a breakpoint on it - is called earlier. I've tried setting the breakpoint and then issuing the pdb command run/restart, but I get the following error:
How can I set a breakpoint and re-run? I could run the test file in pdb, create the testcase class, etc but I wondered if there was an easier way.
Using the pdb command jump doesn't work because it can only jump around in the bottom stack frame, which is inside nose not my code.
And using a .pdbrc to set the breakpoint doesn't work either. The text that says a breakpoint has been set is printed out but it still invokes pdb on the assertion failure and not the earlier code which has the breakpoint on it.
Many thanks,
Derek
The text was updated successfully, but these errors were encountered: