Intellij Ultimate windows python unit test

已回答

I have intellij Ultimate for windows and mac.  In preference -> python integrated Tools -> Default test runner, I have set to Unittests on both windows and mac.  On the mac if I right click a unit test and select run or debug it creates a python test Unittests build configuration for that test to run.  If I do the same on intellij windows this creates a python build configuration not python test unittest configuration, so this can not be used to run or debug as this does not give results or attach.  I have to manually create a python test UnitTest build configuration if I want to use one even though this is set as the default.

It will work on windows if I select Nosetests as the default test runner or pytest (although debug does not work) and creates the right build config but not Unittest.

Am I missing something else that needs to be set on windows? 

0

Hi Paulmcl78! Sounds like PyCharm doesn't understand the code can be executed with unittest. Do you have the same codebase on macOS and Windows?

0
Avatar
Permanently deleted user

Hey Pavel, thanks for the reply. Its the exact same code base on both.

0

Hm, I see, could you please select Run | Run... from the top menu bar, is there an option to run a file as a test?

0

请先登录再写评论。