Отключить автоматическое модульное тестирование в 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[2])))
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?

Solution

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.

7 голосов | спросил Peter 12 FebruaryEurope/MoscowbThu, 12 Feb 2015 13:03:41 +0300000000pmThu, 12 Feb 2015 13:03:41 +030015 2015, 13:03:41

0 ответов


Похожие вопросы

Популярные теги

security × 330linux × 316macos × 2827 × 268performance × 244command-line × 241sql-server × 235joomla-3.x × 222java × 189c++ × 186windows × 180cisco × 168bash × 158c# × 142gmail × 139arduino-uno × 139javascript × 134ssh × 133seo × 132mysql × 132