开发者

py.test with non-python tests (specifically, with cxxtest)

开发者 https://www.devze.com 2023-01-22 07:06 出处:网络
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 ac

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 integ开发者_JS百科ration 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


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


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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消