Pycharm test framework quits unexpectedly

Answered

Hi. I have a problem with the testing framework on pycharm.

I use PyCharm mostly on Linux, but i recently had to change to a MAC. I decided to take the project in a USB memory and then copy it into the MAC.

The project opened fine, and the it runs the python scripts fine, but the tests won't run. When i try to run a testing configuration i get:

I am using PyCharm 2016.2. unittest module.

I tried deleting the configurations and creating new testing config. I also tried deleting the entire .idea folder.

The funny thing is that the same thing happened on windows and i wasn't able to fix it.

This happens on python2 and python3.

0
5 comments

Hello.

Can you run nosetests from teminal? Does it work? 

0

Hi, thanks for responding.

I'm not using nose test for now, just the standar unitest framework.

It runs fine if i run the tests from terminal.

I even created a normal python configuration on pycharm which runs the test files and it runs fine. But all the info is shown on the integrated terminal instead of pycharm testing framework.

0

Can you provide project to reproduce?

 

0

Can you please open "opcode.py" and check if it has __all__ on line 7?

 

0

Hi.

I found the problem. It was a name clash.

One of my source files was named opcode.py, so when dis.py (form pycharm testing framework) tried to do

from opcode import __all__ as _opcodes_all


It looked in my own opcode file instead of the framkework. Changing the name of the file solved the problem.

It is strange this didn't happen on Linux.

Is this name-clashing issue fixable internally?

 

Thanks.

0

Please sign in to leave a comment.