We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9529d2c commit d25e35fCopy full SHA for d25e35f
ydb/library/yql/udfs/common/python/bindings/py_cast_ut.cpp
@@ -68,17 +68,23 @@ Y_UNIT_TEST_SUITE(TPyCastTest) {
68
yexception, "Cast error object '3 <dot> 1415926' to Float");
69
}
70
71
+#if PY_MAJOR_VERSION >= 3
72
+# define RETVAL "-1"
73
+#else
74
+# define RETVAL "-18446744073709551616L"
75
+#endif
76
+
77
Y_UNIT_TEST(BadFromPythonLong) {
78
TPythonTestEngine engine;
79
UNIT_ASSERT_EXCEPTION_CONTAINS(
80
engine.ToMiniKQL<ui64>(
81
"def Test():\n"
- " return -1",
82
+ " return " RETVAL,
83
[](const NUdf::TUnboxedValuePod& value) {
84
Y_UNUSED(value);
85
Y_UNREACHABLE();
86
}),
- yexception, "Cast error object -1 to Long");
87
+ yexception, "Cast error object " RETVAL " to Long");
88
89
90
0 commit comments