Cannot debug nose tests using jython

PyCharm Community Edition 3.1.1
   Build #PC-133.881, built on February 14th, 2014
  
(En passant - it would be really helpful if the About Box didn't disappear as soon as I started typing into the browser! And it would be really nice if I could copy that version info from about box!!)

Running on Ubuntu 12.04

I have Python 2.7.5 and Jython 2.5.6 installed and nosetests installed into each

I create a simple script (called fred.py)
    def hello():
        raise ValueError('world')

I create a simple test script (called test/test_fred.py)
    from nose.tools import raises
    import fred
    @raises(ValueError)
    def test_hello():
        fred.hello()

No problems with any of these scenarios:
    1. run the script with python
    2. debug the script with python
    3. test the script with python
    4. debug the test with python
    5. run the script with jython
    6. debug the script with jython
    7. test the script with jython

This scenario causes a problem:
    8. debug the test with jython

Problem looks like this in the test output window:

/home/alanb/bin/jython2.5.4rc1/bin/jython -Dpython.path=/home/alanb/src/git/git.cork.s3group.com/gitroot/cmftools/blackduck/scanner/lib:/home/alanb/bin/jython2.5.4rc1/jython.jar:/home/alanb/Downloads/pycharm-community-3.1/helpers/pydev:/home/alanb/src/python/testing:/home/alanb/Downloads/pycharm-community-3.1/helpers/pycharm /home/alanb/Downloads/pycharm-community-3.1/helpers/pydev/pydevd.py –multiproc –client 127.0.0.1 –port 41619 –file /home/alanb/Downloads/pycharm-community-3.1/helpers/pycharm/noserunner.py /home/alanb/src/python/testing/
Testing started at 12:44 ...
pydev debugger: warning: sys._current_frames is not supported in Python 2.4, it is recommended to install threadframe module
pydev debugger: warning: See http://majid.info/blog/threadframe-multithreaded-stack-frame-extraction-for-python/
pydev debugger: process 16015 is connecting

Connected to pydev debugger (build 133.881)
Traceback (most recent call last):
  File "/home/alanb/Downloads/pycharm-community-3.1/helpers/pydev/pydevd.py", line 1534, in <module>
    debugger.run(setup['file'], None, None)
  File "/home/alanb/Downloads/pycharm-community-3.1/helpers/pydev/pydevd.py", line 1143, in run
    jython_execfile(sys.argv)
  File "/home/alanb/Downloads/pycharm-community-3.1/helpers/pydev/_pydev_jython_execfile.py", line 6, in jython_execfile
    interpreter.execfile(argv[0])
  File "/home/alanb/Downloads/pycharm-community-3.1/helpers/pycharm/noserunner.py", line 8, in <module>
    from nose_utils import TeamcityPlugin
  File "/home/alanb/Downloads/pycharm-community-3.1/helpers/pycharm/nose_utils.py", line 19, in <module>
    raise NameError(
NameError: Something went wrong, do you have nosetest installed? I got this error: No module named nose

Process finished with exit code 137


This is shown when debugging the test under python (works fine):


/home/alanb/bin/python /home/alanb/Downloads/pycharm-community-3.1/helpers/pydev/pydevd.py –multiproc –client 127.0.0.1 –port 38766 –file /home/alanb/Downloads/pycharm-community-3.1/helpers/pycharm/noserunner.py /home/alanb/src/python/testing/
Testing started at 13:00 ...
pydev debugger: process 18920 is connecting

Connected to pydev debugger (build 133.881)



And this is shown when debugging the main script under jython (also works fine)


/home/alanb/bin/jython2.5.4rc1/bin/jython -Dpython.path=/home/alanb/src/git/git.cork.s3group.com/gitroot/cmftools/blackduck/scanner/lib:/home/alanb/bin/jython2.5.4rc1/jython.jar:/home/alanb/Downloads/pycharm-community-3.1/helpers/pydev:/home/alanb/src/python/testing:/home/alanb/Downloads/pycharm-community-3.1/helpers/pycharm /home/alanb/Downloads/pycharm-community-3.1/helpers/pydev/pydevd.py –multiproc –client 127.0.0.1 –port 51704 –file /home/alanb/src/python/testing/fred.py
pydev debugger: warning: sys._current_frames is not supported in Python 2.4, it is recommended to install threadframe module
pydev debugger: warning: See http://majid.info/blog/threadframe-multithreaded-stack-frame-extraction-for-python/
pydev debugger: process 18160 is connecting

Connected to pydev debugger (build 133.881)


===
En passant - that message about "sys._current_frames is not supported in Python 2.4" seems redundant:

$ jython –version
Jython 2.5.4rc1

Please sign in to leave a comment.