Browse Source

Intermediate changes
commit_hash:cc9503be6d57be9c39414db777dfe5ccbfe7d438

robot-piglet 2 months ago
parent
commit
0f01a254ab

+ 0 - 21
contrib/libs/python/ut/lib/test.cpp

@@ -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();
-}

+ 0 - 7
contrib/libs/python/ut/lib/test.h

@@ -1,7 +0,0 @@
-#pragma once
-
-class TTestPyInvoker {
-public:
-    TTestPyInvoker();
-    const char* GetVersion();
-};

+ 0 - 19
contrib/libs/python/ut/lib/ya.make

@@ -1,19 +0,0 @@
-SUBSCRIBER(spreis)
-
-PY23_LIBRARY()
-
-WITHOUT_LICENSE_TEXTS()
-
-VERSION(Service-proxy-version)
-
-LICENSE(YandexOpen)
-
-PEERDIR(
-    library/cpp/testing/unittest
-)
-
-SRCS(
-    test.cpp
-)
-
-END()

+ 0 - 10
contrib/libs/python/ut/py2/use.cpp

@@ -1,10 +0,0 @@
-#include <contrib/libs/python/ut/lib/test.h>
-#include <library/cpp/testing/unittest/registar.h>
-
-Y_UNIT_TEST_SUITE(TestPy3Binding) {
-    Y_UNIT_TEST(version) {
-         TTestPyInvoker invoker;
-         UNIT_ASSERT_EQUAL(invoker.GetVersion()[0], '2');
-    }
-}
-

+ 0 - 9
contrib/libs/python/ut/py2/ya.make

@@ -1,9 +0,0 @@
-SUBSCRIBER(spreis)
-
-UNITTEST()
-SRCS(use.cpp)
-
-PEERDIR(
-    contrib/libs/python/ut/lib
-)
-END()

+ 0 - 10
contrib/libs/python/ut/py3/use.cpp

@@ -1,10 +0,0 @@
-#include <contrib/libs/python/ut/lib/test.h>
-#include <library/cpp/testing/unittest/registar.h>
-
-Y_UNIT_TEST_SUITE(TestPy3Binding) {
-    Y_UNIT_TEST(version) {
-         TTestPyInvoker invoker;
-         UNIT_ASSERT_EQUAL(invoker.GetVersion()[0], '3');
-    }
-}
-

+ 0 - 10
contrib/libs/python/ut/py3/ya.make

@@ -1,10 +0,0 @@
-SUBSCRIBER(spreis)
-
-UNITTEST()
-USE_PYTHON3()
-SRCS(use.cpp)
-
-PEERDIR(
-    contrib/libs/python/ut/lib
-)
-END()

+ 0 - 7
contrib/libs/python/ut/ya.make

@@ -1,7 +0,0 @@
-SUBSCRIBER(spreis)
-
-RECURSE(
-    lib
-    py2
-    py3
-)