-
Notifications
You must be signed in to change notification settings - Fork 15.3k
[lldb] Fix bad method call in TestExprDiagnostics.py
#120901
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Fixes
Traceback (most recent call last):
File "/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py", line 1770, in test_method
return attrvalue(self)
^^^^^^^^^^^^^^^
File "/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/test/API/commands/expression/diagnostics/TestExprDiagnostics.py", line 255, in test_command_expr_sbdata
self.assertEquals(error.GetType(), lldb.eErrorTypeExpression)
^^^^^^^^^^^^^^^^^
AttributeError: 'ExprDiagnosticsTestCase' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?
`assertEqual` is a method inherited from `unittest.TestCase`.
See llvm#120784 and llvm#120784 (comment)
|
@llvm/pr-subscribers-lldb Author: Carlo Cabrera (carlocab) ChangesFixes
See #120784 and #120784 (comment) Full diff: https://github.com/llvm/llvm-project/pull/120901.diff 1 Files Affected:
diff --git a/lldb/test/API/commands/expression/diagnostics/TestExprDiagnostics.py b/lldb/test/API/commands/expression/diagnostics/TestExprDiagnostics.py
index 59e759352ce063..b476a807c6dc0e 100644
--- a/lldb/test/API/commands/expression/diagnostics/TestExprDiagnostics.py
+++ b/lldb/test/API/commands/expression/diagnostics/TestExprDiagnostics.py
@@ -252,7 +252,7 @@ def check_error(diags):
value = frame.EvaluateExpression("a+b")
error = value.GetError()
self.assertTrue(error.Fail())
- self.assertEquals(error.GetType(), lldb.eErrorTypeExpression)
+ self.assertEqual(error.GetType(), lldb.eErrorTypeExpression)
data = error.GetErrorData()
version = data.GetValueForKey("version")
self.assertEqual(version.GetIntegerValue(), 1)
|
|
Merging now since this is relatively low-risk and should hopefully unbreak some buildbots. |
|
Seems to be good now: https://lab.llvm.org/buildbot/#/builders/195/builds/2748 |
|
Thanks. |
|
Thanks for fixing this! |
Fixes
Traceback (most recent call last):
File
"/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py",
line 1770, in test_method
return attrvalue(self)
^^^^^^^^^^^^^^^
File
"/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/test/API/commands/expression/diagnostics/TestExprDiagnostics.py",
line 255, in test_command_expr_sbdata
self.assertEquals(error.GetType(), lldb.eErrorTypeExpression)
^^^^^^^^^^^^^^^^^
AttributeError: 'ExprDiagnosticsTestCase' object has no attribute
'assertEquals'. Did you mean: 'assertEqual'?
`assertEqual` is a method inherited from `unittest.TestCase`.
See llvm#120784 and
llvm#120784 (comment)
(cherry picked from commit aca7a70)
[lldb] Fix bad method call in `TestExprDiagnostics.py` (llvm#120901)
Fixes
assertEqualis a method inherited fromunittest.TestCase.See #120784 and #120784 (comment)