diff options
author | monster <[email protected]> | 2022-07-07 14:41:37 +0300 |
---|---|---|
committer | monster <[email protected]> | 2022-07-07 14:41:37 +0300 |
commit | 06e5c21a835c0e923506c4ff27929f34e00761c2 (patch) | |
tree | 75efcbc6854ef9bd476eb8bf00cc5c900da436a2 /contrib/libs/python/ut/lib/test.cpp | |
parent | 03f024c4412e3aa613bb543cf1660176320ba8f4 (diff) |
fix ya.make
Diffstat (limited to 'contrib/libs/python/ut/lib/test.cpp')
-rw-r--r-- | contrib/libs/python/ut/lib/test.cpp | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/contrib/libs/python/ut/lib/test.cpp b/contrib/libs/python/ut/lib/test.cpp deleted file mode 100644 index e3aabc8889f..00000000000 --- a/contrib/libs/python/ut/lib/test.cpp +++ /dev/null @@ -1,21 +0,0 @@ -#include "test.h" - -#include <Python.h> -#include <library/cpp/testing/unittest/registar.h> - -TTestPyInvoker::TTestPyInvoker() {} - -const char* TTestPyInvoker::GetVersion() { - Py_Initialize(); - - auto* module = PyImport_ImportModule("sys"); - UNIT_ASSERT(module != nullptr); - - auto* versionObj = PyObject_GetAttrString(module, "version"); - if (versionObj == nullptr) { - Py_DECREF(module); - UNIT_ASSERT(versionObj != nullptr); - } - - return Py_GetVersion(); -} |