Honestly, C ++ is a bit messy. You can do something like create a pure C function that wraps C ++ functionality (which you call from python), but at this point you can write your tests in C ++. Unfortunately, the only tool for this (that I know) is SWIG.
, "" , . (, JUST ints , , char *), . swig, , . , , API CPython, .
CPython SWIG. , , API . , . , , C/++.
( )