Author: labath
Date: Thu Feb 25 11:41:59 2016
New Revision: 261901

URL: http://llvm.org/viewvc/llvm-project?rev=261901&view=rev
Log:
Fix PythonDataObjectsTests for python 2

Summary:
the python2 branch seems erroneous as it expected the object to be both a 
"String" and "Bytes".
Fix the expectation.

Reviewers: zturner

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D17545

Modified:
    lldb/trunk/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp

Modified: 
lldb/trunk/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp?rev=261901&r1=261900&r2=261901&view=diff
==============================================================================
--- lldb/trunk/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp 
(original)
+++ lldb/trunk/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp 
Thu Feb 25 11:41:59 2016
@@ -209,14 +209,13 @@ TEST_F(PythonDataObjectsTest, TestPython
     PyObject *py_bytes = PyBytes_FromString(test_bytes);
     EXPECT_TRUE(PythonBytes::Check(py_bytes));
     PythonBytes python_bytes(PyRefType::Owned, py_bytes);
-    EXPECT_EQ(PyObjectType::Bytes, python_bytes.GetObjectType());
 
 #if PY_MAJOR_VERSION < 3
     EXPECT_TRUE(PythonString::Check(py_bytes));
     EXPECT_EQ(PyObjectType::String, python_bytes.GetObjectType());
 #else
     EXPECT_FALSE(PythonString::Check(py_bytes));
-    EXPECT_NE(PyObjectType::String, python_bytes.GetObjectType());
+    EXPECT_EQ(PyObjectType::Bytes, python_bytes.GetObjectType());
 #endif
 
     llvm::ArrayRef<uint8_t> bytes = python_bytes.GetBytes();


_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to