Pycharm won't allow to run a file. Shows run unittest option only.

前端 未结 6 1381
猫巷女王i
猫巷女王i 2020-12-28 12:41

I have a file and it has bunch of methods starting with prefix \"test\". Now I want to run this file and it has a __name__ == \"__main__\" construct which sets

6条回答
  •  隐瞒了意图╮
    2020-12-28 13:11

    I couldn't get @yole's answer to work but i did manage by going to run > edit configurations > new configuration (the plus sign) > select python, now input a name (mine was 'stop the bloody unittest') and select the correct script

提交回复
热议问题