pydev notests 测试运行

发布于 2024-12-17 07:43:41 字数 119 浏览 3 评论 0原文

似乎是一个愚蠢的问题,但我一直无法弄清楚......

我想使用 eclipse/pyunit 来运行我的所有测试。我已将测试运行程序配置为鼻子测试运行程序。

现在我想让 pyunit 使用鼻子

Seems like a silly question but I've been unable to figure it out...

I'd like to use eclipse/pyunit to run all my tests. I've configured the test runner to be the nose test runner.

Now I'd like for pyunit to use nose

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

氛圍 2024-12-24 07:43:41

您可以右键单击文件夹/文件并选择运行为> Python unittest 或者如果您在编辑器中打开文件,则可以使用“Ctrl+F9”来运行测试(甚至可以过滤以选择要运行的测试)。


注意:要与鼻子一起使用,您必须在首选项中选择鼻子测试运行程序(窗口>首选项> pydev> pyunit) - 如果您使用 py.test 运行程序,情况也是如此(但是请注意,如果您使用常规的单元测试,默认运行程序应该可以正常工作)。

You can right-click a folder/file and choose Run as > Python unittest or if you have the file open in an editor, you can use 'Ctrl+F9' to run the tests (and even filter to select the test(s) you want to run).


Note: for this to work with nose you have to select the nose test runner in the preferences (window > preferences > pydev > pyunit) -- and the same is true if you're using the py.test runner (but note that if you're using regular unittest tests, the default runner should work fine).

花桑 2024-12-24 07:43:41

我找到了这个解决方案:

  1. 在主菜单上,转到 Windows->Preference->PyDev->PyUnit
  2. 在“测试运行程序”下选择 Nose 测试运行程序。
  3. 申请
  4. 确定

I found this solution:

  1. On the main menu, go to Windows->Preference->PyDev->PyUnit
  2. Under "test runner" choose Nose test runner.
  3. Apply
  4. Ok
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文