Skip to content

Conversation

@carlocab
Copy link
Member

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 #120784 and #120784 (comment)

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)
@llvmbot
Copy link
Member

llvmbot commented Dec 22, 2024

@llvm/pr-subscribers-lldb

Author: Carlo Cabrera (carlocab)

Changes

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 #120784 and #120784 (comment)


Full diff: https://github.com/llvm/llvm-project/pull/120901.diff

1 Files Affected:

  • (modified) lldb/test/API/commands/expression/diagnostics/TestExprDiagnostics.py (+1-1)
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)

@carlocab
Copy link
Member Author

Merging now since this is relatively low-risk and should hopefully unbreak some buildbots.

@carlocab carlocab merged commit aca7a70 into llvm:main Dec 23, 2024
9 checks passed
@carlocab carlocab deleted the lldb-TestExprDiagnostics branch December 23, 2024 07:37
@carlocab
Copy link
Member Author

Seems to be good now: https://lab.llvm.org/buildbot/#/builders/195/builds/2748

@labath
Copy link
Collaborator

labath commented Dec 23, 2024

Thanks.

@adrian-prantl
Copy link
Collaborator

Thanks for fixing this!

adrian-prantl pushed a commit to swiftlang/llvm-project that referenced this pull request Aug 18, 2025
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)
adrian-prantl added a commit to swiftlang/llvm-project that referenced this pull request Aug 18, 2025
[lldb] Fix bad method call in `TestExprDiagnostics.py` (llvm#120901)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants