[Lldb-commits] [lldb] aca7a70 - [lldb] Fix bad method call in `TestExprDiagnostics.py` (#120901)

2024-12-22 Thread via lldb-commits

Author: Carlo Cabrera
Date: 2024-12-23T15:36:57+08:00
New Revision: aca7a70cdada8aa13c7f4e24c431bfe47218a3fa

URL: 
https://github.com/llvm/llvm-project/commit/aca7a70cdada8aa13c7f4e24c431bfe47218a3fa
DIFF: 
https://github.com/llvm/llvm-project/commit/aca7a70cdada8aa13c7f4e24c431bfe47218a3fa.diff

LOG: [lldb] Fix bad method call in `TestExprDiagnostics.py` (#120901)

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
https://github.com/llvm/llvm-project/pull/120784#issuecomment-2557871308

Added: 


Modified: 
lldb/test/API/commands/expression/diagnostics/TestExprDiagnostics.py

Removed: 




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)



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


[Lldb-commits] [lldb] [lldb] Fix bad method call in `TestExprDiagnostics.py` (PR #120901)

2024-12-22 Thread Carlo Cabrera via lldb-commits

carlocab wrote:

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

https://github.com/llvm/llvm-project/pull/120901
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb] Fix bad method call in `TestExprDiagnostics.py` (PR #120901)

2024-12-22 Thread Carlo Cabrera via lldb-commits

https://github.com/carlocab created 
https://github.com/llvm/llvm-project/pull/120901

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 
https://github.com/llvm/llvm-project/pull/120784#issuecomment-2557871308


>From 7aaa325e2465a9e97f28b428851bcf73fc84bd3b Mon Sep 17 00:00:00 2001
From: Carlo Cabrera 
Date: Sun, 22 Dec 2024 23:10:33 +0800
Subject: [PATCH] [lldb] Fix bad method call in `TestExprDiagnostics.py`

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 
https://github.com/llvm/llvm-project/pull/120784#issuecomment-2557871308
---
 .../API/commands/expression/diagnostics/TestExprDiagnostics.py  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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)

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


[Lldb-commits] [lldb] [lldb] Fix bad method call in `TestExprDiagnostics.py` (PR #120901)

2024-12-22 Thread via lldb-commits

llvmbot wrote:




@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 
https://github.com/llvm/llvm-project/pull/120784#issuecomment-2557871308


---
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
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)

``




https://github.com/llvm/llvm-project/pull/120901
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb] Expose structured errors in SBError (PR #120784)

2024-12-22 Thread Carlo Cabrera via lldb-commits

carlocab wrote:

Opened #120901 to fix the test failure.

https://github.com/llvm/llvm-project/pull/120784
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits