擅长:python、mysql、java
<p>我试过了Łukasz的答案,它起作用了,但是我不喜欢<code>OK (SKIP=<number>)</code>消息。出于我自己的愿望和目标,我不想让我或其他人开始相信任何特定数量的跳过的测试,或者不信任和挖掘测试套件并询问为什么会跳过某些东西,而且总是这样?是故意的?对我来说,这是不可能的。在</p>
<p>我碰巧专门使用nosetests,而且按照惯例,以<code>_</code>开头的测试类不运行,因此将基类命名为<code>_TestBaseClass</code>就足够了。在</p>
<p>我在Pycharm中用Unittests和py.测试这两个都试图运行我的基类及其测试,结果导致错误,因为抽象基类中没有实例数据。也许有人对这两个跑步者中的任何一个有特定的了解,可以做一个套件,或者其他东西,绕过基类。在</p>