aboutsummaryrefslogtreecommitdiff
path: root/lldb/unittests/ScriptInterpreter/Python
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/unittests/ScriptInterpreter/Python')
-rw-r--r--lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp22
-rw-r--r--lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp2
2 files changed, 12 insertions, 12 deletions
diff --git a/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp b/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
index 2dd92fc..0d4b04b 100644
--- a/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
+++ b/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
@@ -632,8 +632,8 @@ TEST_F(PythonDataObjectsTest, TestCallable) {
ASSERT_FALSE(error);
{
- PyObject *o = PyRun_String("lambda x : x", Py_eval_input, globals.get(),
- globals.get());
+ PyObject *o =
+ RunString("lambda x : x", Py_eval_input, globals.get(), globals.get());
ASSERT_FALSE(o == NULL);
auto lambda = Take<PythonCallable>(o);
auto arginfo = lambda.GetArgInfo();
@@ -642,8 +642,8 @@ TEST_F(PythonDataObjectsTest, TestCallable) {
}
{
- PyObject *o = PyRun_String("lambda x,y=0: x", Py_eval_input, globals.get(),
- globals.get());
+ PyObject *o = RunString("lambda x,y=0: x", Py_eval_input, globals.get(),
+ globals.get());
ASSERT_FALSE(o == NULL);
auto lambda = Take<PythonCallable>(o);
auto arginfo = lambda.GetArgInfo();
@@ -652,8 +652,8 @@ TEST_F(PythonDataObjectsTest, TestCallable) {
}
{
- PyObject *o = PyRun_String("lambda x,y=0, **kw: x", Py_eval_input,
- globals.get(), globals.get());
+ PyObject *o = RunString("lambda x,y=0, **kw: x", Py_eval_input,
+ globals.get(), globals.get());
ASSERT_FALSE(o == NULL);
auto lambda = Take<PythonCallable>(o);
auto arginfo = lambda.GetArgInfo();
@@ -662,8 +662,8 @@ TEST_F(PythonDataObjectsTest, TestCallable) {
}
{
- PyObject *o = PyRun_String("lambda x,y,*a: x", Py_eval_input, globals.get(),
- globals.get());
+ PyObject *o = RunString("lambda x,y,*a: x", Py_eval_input, globals.get(),
+ globals.get());
ASSERT_FALSE(o == NULL);
auto lambda = Take<PythonCallable>(o);
auto arginfo = lambda.GetArgInfo();
@@ -673,8 +673,8 @@ TEST_F(PythonDataObjectsTest, TestCallable) {
}
{
- PyObject *o = PyRun_String("lambda x,y,*a,**kw: x", Py_eval_input,
- globals.get(), globals.get());
+ PyObject *o = RunString("lambda x,y,*a,**kw: x", Py_eval_input,
+ globals.get(), globals.get());
ASSERT_FALSE(o == NULL);
auto lambda = Take<PythonCallable>(o);
auto arginfo = lambda.GetArgInfo();
@@ -713,7 +713,7 @@ class NewStyle(object):
)";
PyObject *o =
- PyRun_String(script, Py_file_input, globals.get(), globals.get());
+ RunString(script, Py_file_input, globals.get(), globals.get());
ASSERT_FALSE(o == NULL);
Take<PythonObject>(o);
diff --git a/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp b/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
index fbb005b..068860e 100644
--- a/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
+++ b/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
@@ -22,7 +22,7 @@ void PythonTestSuite::SetUp() {
// test suite.
Py_InitializeEx(0);
m_gil_state = PyGILState_Ensure();
- PyRun_SimpleString("import sys");
+ python::RunSimpleString("import sys");
}
void PythonTestSuite::TearDown() {