Phyton Interactive debugging with nosetests in PyDev python interactive debugging,python interactive debugging pycharm,python interactive debugger,

I'm using PyDev ( with Aptana ) to write and debug a Python Pylons app, and I'd like to step through the tests in the debugger.

Is it possible to launch nosetests through PyDev and stop at breakpoints?

Answer:1

Here is what i do to run nosetests using eclipse Pydev (Hope this will help you).

first of all i create a python script and i put it in the root of my package directory :

--Package
    |
    | -- runtest.py
    |
    | -- ... (others modules) 

and in runtest.py i put:

import nose
nose.main()

now i go to in the menu Run -> Run configurations and i create a new configuration of Pydev Django i choose my package and put runtest.py in the main Module , next i go to arguments tab in the same widget and i put in Program arguments the path to my project and different arg to pass to the script example:

/home/me/projects/src --with-doctest  # Run doctests too

now after clicking on Apply i can run this configuration .

For debugging you can run this configuration in debug mode and put your break point anywhere in your code and you can use the terrific debug widget to do several action : step into, to see vars ...

N.B : for doctests sadly i don't think you can put breakpoint in the line of doctest but what you can do is to put your breakpoint in the def of the function that is called by the doctest and like that you can use the debug mode .

Answer:2

Try import pydevd; pydevd.settrace() where would like a breakpoint.

Answer:3



  1. python interactive debugging
  2. python interactive debugging pycharm
  3. python interactive debugger
  4. python interactive debugger gui
  5. python interactive debug mode
  6. python debug interactive console
  7. python debug interactive visual studio
  8. python debug interactive shell

I have a need to run a PowerShell function from a Python script. Both the .ps1 and the .py files currently live in the same directory. The functions I want to call are in the PowerShell script. ...

I have a need to run a PowerShell function from a Python script. Both the .ps1 and the .py files currently live in the same directory. The functions I want to call are in the PowerShell script. ...

A top class called Parametric is used to create objects which can have parameters associated with them: class Parametric(object): def __init__(self, name): self.name = name self.pars = [] class ...

A top class called Parametric is used to create objects which can have parameters associated with them: class Parametric(object): def __init__(self, name): self.name = name self.pars = [] class ...