diff options
Diffstat (limited to 'unittests/ScriptInterpreter/Python')
| -rw-r--r-- | unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp | 6 | ||||
| -rw-r--r-- | unittests/ScriptInterpreter/Python/PythonTestSuite.cpp | 6 | 
2 files changed, 9 insertions, 3 deletions
diff --git a/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp b/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp index 1376f268aa79..5726670b15fd 100644 --- a/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp +++ b/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp @@ -167,7 +167,7 @@ TEST_F(PythonDataObjectsTest, TestDictionaryResolutionWithDot) {  }  TEST_F(PythonDataObjectsTest, TestPythonInteger) { -// Test that integers behave correctly when wrapped by a PythonInteger. +  // Test that integers behave correctly when wrapped by a PythonInteger.  #if PY_MAJOR_VERSION < 3    // Verify that `PythonInt` works correctly when given a PyInt object. @@ -557,7 +557,9 @@ TEST_F(PythonDataObjectsTest, TestPythonCallableInvoke) {  }  TEST_F(PythonDataObjectsTest, TestPythonFile) { -  File file(FileSystem::DEV_NULL, File::eOpenOptionRead); +  File file; +  FileSystem::Instance().Open(file, FileSpec(FileSystem::DEV_NULL), +                              File::eOpenOptionRead);    PythonFile py_file(file, "r");    EXPECT_TRUE(PythonFile::Check(py_file.get()));  } diff --git a/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp b/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp index 608f3ee45e5e..7bc8f64b4853 100644 --- a/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp +++ b/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp @@ -7,10 +7,11 @@  //  //===----------------------------------------------------------------------===// -#include "Plugins/ScriptInterpreter/Python/lldb-python.h"  #include "gtest/gtest.h"  #include "Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h" +#include "Plugins/ScriptInterpreter/Python/lldb-python.h" +#include "lldb/Host/FileSystem.h"  #include "lldb/Host/HostInfo.h"  #include "PythonTestSuite.h" @@ -18,6 +19,7 @@  using namespace lldb_private;  void PythonTestSuite::SetUp() { +  FileSystem::Initialize();    HostInfoBase::Initialize();    // ScriptInterpreterPython::Initialize() depends on HostInfo being    // initializedso it can compute the python directory etc. @@ -36,4 +38,6 @@ void PythonTestSuite::TearDown() {    PyGILState_Release(m_gil_state);    ScriptInterpreterPython::Terminate(); +  HostInfoBase::Terminate(); +  FileSystem::Terminate();  }  | 
