From ccc732dae294351e7c5caeb779be70e7afbf6139 Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Sat, 17 Aug 2024 18:08:09 +1200 Subject: [PATCH] ldb:tests:api_misc: fix Control test `self.assertRaises(TypeError, ldb.Control, ldb, 1234)` is raising a TypeError because `ldb` is not an ldb.Ldb object, it is the ldb module. What we want to test here is that the non-string `1234` raises a TypeError -- the previous line tests the type of the ldb argument. Signed-off-by: Douglas Bagnall Reviewed-by: Andreas Schneider --- lib/ldb/tests/python/api_misc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ldb/tests/python/api_misc.py b/lib/ldb/tests/python/api_misc.py index 5b36342ed52..d855e048324 100644 --- a/lib/ldb/tests/python/api_misc.py +++ b/lib/ldb/tests/python/api_misc.py @@ -998,7 +998,7 @@ class BadTypeTests(TestCase): def test_control(self): l = ldb.Ldb() self.assertRaises(TypeError, ldb.Control, '', 'relax:1') - self.assertRaises(TypeError, ldb.Control, ldb, 1234) + self.assertRaises(TypeError, ldb.Control, l, 1234) def test_modify(self): l = ldb.Ldb() -- 2.47.2