[lldb] Update PythonDataObjectsTests for new exception formatting
PythonDataObjectsTest.TestExceptions started failing because the output of the python traceback printers is now consistent between python and cpython [1]. Work around the issue by supporting both variants. Thanks to Ismail for identifying the root cause. [1] https://github.com/python/cpython/issues/85203
This commit is contained in:
1 file changed
+7
-4
@@ -802,10 +802,13 @@ def main():
|
||||
|
||||
PythonScript lol(script2);
|
||||
|
||||
EXPECT_THAT_EXPECTED(lol(),
|
||||
llvm::Failed<PythonException>(testing::Property(
|
||||
&PythonException::ReadBacktrace,
|
||||
testing::ContainsRegex("unprintable MyError"))));
|
||||
EXPECT_THAT_EXPECTED(
|
||||
lol(),
|
||||
llvm::Failed<PythonException>(testing::Property(
|
||||
&PythonException::ReadBacktrace,
|
||||
testing::AnyOf(
|
||||
testing::ContainsRegex("MyError: <exception str\\(\\) failed>"),
|
||||
testing::ContainsRegex("unprintable MyError")))));
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user