Problem debugging with unittest2

Hi,

I'm running the latest EAP of PyCharm (98.404), Python 2.6.x, and 2.7's backport of the unit test framework unittest2.  If I simply run tests through a normal run configuration, everything works.  But as soon as I try to kick off my tests with the debugger, I get: "AttributeError: 'module' object has no attribute 'TestCase'" on line "class TestMarkerInjection(unittest2.TestCase)". 

Am I doing something wrong or is this a bug?

Thanks

Dmitry

4 comments
Comment actions Permalink

Hello Dmitry,

Please try the really latest EAP of PyCharm, which is build 100.54. It contains

a fix related to this problem.

I'm running the latest EAP of PyCharm (98.404), Python 2.6.x, and

2.7's backport of the unit test framework unittest2.  If I simply run

tests through a normal run configuration, everything works.  But as

soon as I try to kick off my tests with the debugger, I get:

"AttributeError: 'module' object has no attribute 'TestCase'" on line

"class TestMarkerInjection(unittest2.TestCase)".

Am I doing something wrong or is this a bug?

--

Dmitry Jemerov

Development Lead

JetBrains, Inc.

http://www.jetbrains.com/

"Develop with Pleasure!"

0
Comment actions Permalink

Just installed 100.54 and tried again with the same result:

C:\Python26\python.exe "C:\Program Files\JetBrains\PyCharm 100.54\helpers\pydev\pydevd.py" --client 127.0.0.1 --port 2773 --file U:/scam/src/test/py/unit/realsource/run.py
pydev debugger: starting
Connected to pydevd (version PYCHARM-1.1)
E
======================================================================
ERROR: Failure: ImportError (cannot import name TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Python26\lib\site-packages\nose-0.11.3-py2.6.egg\nose\loader.py", line 382, in loadTestsFromName
    addr.filename, addr.module)
  File "C:\Python26\lib\site-packages\nose-0.11.3-py2.6.egg\nose\importer.py", line 39, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "C:\Python26\lib\site-packages\nose-0.11.3-py2.6.egg\nose\importer.py", line 86, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "U:\scam\src\test\py\unit\realsource\test_lib.py", line 1, in 
    from unittest2 import TestCase
ImportError: cannot import name TestCase
0
Comment actions Permalink

should I file another bug report?

0
Comment actions Permalink

Hello Dmitry,

should I file another bug report?

Please do.

--

Dmitry Jemerov

Development Lead

JetBrains, Inc.

http://www.jetbrains.com/

"Develop with Pleasure!"

0

Please sign in to leave a comment.