py.test 与非 python 测试(特别是使用 cxxtest)

发布于 2024-09-29 15:17:31 字数 313 浏览 0 评论 0原文

我与一个开发基于 MPI 的 C++ 数值应用程序的团队合作。该小组使用 cxxtest 构建单独的单元测试或小型套件,但是 1)使用 cxxtest 的常用功能跨目录聚合会出现一些复杂情况,2)有一些集成测试通过启动 mpirun 更容易“从外部”实现单个Python线程。

我们想使用 py.test 作为将其粘合在一起的粘合剂,因为它宣传自己能够运行非 python 测试(我可以确信跳到鼻子)。

谁能帮助我开始执行此操作的最佳实践?再说一次,因为它似乎是 py.test 所宣传的功能之一,所以我很乐意按照最初设想的方式进行。

谢谢,

伊莱

I work with a team that develops MPI-based C++ numerical applications. The group uses cxxtest for constructing individual unit tests or small suites, but 1) there are some complications aggregating across directories with cxxtest's usual features and 2) there are some integration tests that are simply easier to implement "from the outside" by launching mpirun from a single python thread.

We would like to use py.test as the glue that holds this together, since it advertises itself as being able to run non-python tests (I could be convinced to jump to nose).

Can anyone get me started on the best practice for doing this? Again, since it seems to be one of the advertised features of py.test I'd love to go about it the way that was originally envisioned.

Thanks,

Eli

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

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

发布评论

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

评论(3

如此安好 2024-10-06 15:17:32

您可能还对 Saru 感兴趣,它是一个最小的测试框架,可让您用 python 和 C++ 编写测试

https://github.com/squishy humans/saru/wiki/Writing-tests

you might also be interested in Saru, it's a minimal testing framework that will let you write your tests in python and C++

https://github.com/squishyhumans/saru/wiki/Writing-tests

零時差 2024-10-06 15:17:31

2014 年 2 月的本指南提供了一些使用 pytest 运行 C 测试的示例,也许会有帮助。

This guide from Feb 2014 has some worked examples of using pytest to run C tests, perhaps it will help.

離人涙 2024-10-06 15:17:31

查看 pytest-cpp,它可能正是您所需要的。

Checkout pytest-cpp, it might be exactly what you need.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文