Отключить автоматическое модульное тестирование в PyCharm
PyCharm automatically detects when files begin with
test_, and tries to run them as Unittests. Which is very considerate, but something seems to be broken, and on any test I run, I get
/Users/peter/projects/plato/venv/bin/python2.7 "/Applications/PyCharm CE.app/Contents/helpers/pycharm/utrunner.py" /Users/peter/projects/plato/utils/tools/test_sampling.py::::test_samplers_not_broken true Testing started at 10:58 AM ... Traceback (most recent call last): File "/Applications/PyCharm CE.app/Contents/helpers/pycharm/utrunner.py", line 140, in <module> all.addTest(testLoader.makeTest(getattr(module, a))) AttributeError: 'TestLoader' object has no attribute 'makeTest' Process finished with exit code 1
All I want to do is run them as normal python files, but PyCharm won't let me. Eclipse gives the option to run normally or run as unittest. This is annoying! How can I do this?
While it appears you cannot globally disable this option, you can prevent individual files from being run as tests. See this Question for the answer.