projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
python: fix all 'is assigned to but never used' warnings
[babeltrace.git]
/
tests
/
bindings
/
python
/
bt2
/
test_query_executor.py
diff --git
a/tests/bindings/python/bt2/test_query_executor.py
b/tests/bindings/python/bt2/test_query_executor.py
index 3a0e27cb7b7eb1cfb34a08f0cd8feaacf15b4875..1ed63f1a4749c9bbf682404cb867ae7722addf8a 100644
(file)
--- a/
tests/bindings/python/bt2/test_query_executor.py
+++ b/
tests/bindings/python/bt2/test_query_executor.py
@@
-56,7
+56,7
@@
class QueryExecutorTestCase(unittest.TestCase):
query_params = params
query_params = 23
query_params = params
query_params = 23
-
res =
bt2.QueryExecutor(MySink, 'obj', None).query()
+ bt2.QueryExecutor(MySink, 'obj', None).query()
self.assertIs(query_params, None)
del query_params
self.assertIs(query_params, None)
del query_params
@@
-71,7
+71,7
@@
class QueryExecutorTestCase(unittest.TestCase):
query_params = params
query_params = 23
query_params = params
query_params = 23
-
res =
bt2.QueryExecutor(MySink, 'obj').query()
+ bt2.QueryExecutor(MySink, 'obj').query()
self.assertIs(query_params, None)
del query_params
self.assertIs(query_params, None)
del query_params
@@
-87,7
+87,7
@@
class QueryExecutorTestCase(unittest.TestCase):
query_method_obj = None
method_obj = object()
query_method_obj = None
method_obj = object()
-
res =
bt2.QueryExecutor(MySink, 'obj', method_obj=method_obj).query()
+ bt2.QueryExecutor(MySink, 'obj', method_obj=method_obj).query()
self.assertIs(query_method_obj, method_obj)
del query_method_obj
self.assertIs(query_method_obj, method_obj)
del query_method_obj
@@
-125,7
+125,7
@@
class QueryExecutorTestCase(unittest.TestCase):
query_method_obj = method_obj
query_method_obj = object()
query_method_obj = method_obj
query_method_obj = object()
-
res =
bt2.QueryExecutor(MySink, 'obj').query()
+ bt2.QueryExecutor(MySink, 'obj').query()
self.assertIsNone(query_method_obj)
del query_method_obj
self.assertIsNone(query_method_obj)
del query_method_obj
@@
-168,10
+168,10
@@
class QueryExecutorTestCase(unittest.TestCase):
raise ValueError
with self.assertRaises(bt2._Error) as ctx:
raise ValueError
with self.assertRaises(bt2._Error) as ctx:
-
res =
bt2.QueryExecutor(MySink, 'obj', [17, 23]).query()
+ bt2.QueryExecutor(MySink, 'obj', [17, 23]).query()
exc = ctx.exception
exc = ctx.exception
- self.assertEqual(len(exc),
2
)
+ self.assertEqual(len(exc),
3
)
cause = exc[0]
self.assertIsInstance(cause, bt2._ComponentClassErrorCause)
self.assertIn('raise ValueError', cause.message)
cause = exc[0]
self.assertIsInstance(cause, bt2._ComponentClassErrorCause)
self.assertIn('raise ValueError', cause.message)
@@
-188,7
+188,7
@@
class QueryExecutorTestCase(unittest.TestCase):
raise bt2.UnknownObject
with self.assertRaises(bt2.UnknownObject):
raise bt2.UnknownObject
with self.assertRaises(bt2.UnknownObject):
-
res =
bt2.QueryExecutor(MySink, 'obj', [17, 23]).query()
+ bt2.QueryExecutor(MySink, 'obj', [17, 23]).query()
def test_query_logging_level_invalid_type(self):
class MySink(bt2._UserSinkComponent):
def test_query_logging_level_invalid_type(self):
class MySink(bt2._UserSinkComponent):
@@
-228,7
+228,7
@@
class QueryExecutorTestCase(unittest.TestCase):
raise bt2.TryAgain
with self.assertRaises(bt2.TryAgain):
raise bt2.TryAgain
with self.assertRaises(bt2.TryAgain):
-
res =
bt2.QueryExecutor(MySink, 'obj', [17, 23]).query()
+ bt2.QueryExecutor(MySink, 'obj', [17, 23]).query()
def test_query_add_interrupter(self):
class MySink(bt2._UserSinkComponent):
def test_query_add_interrupter(self):
class MySink(bt2._UserSinkComponent):
This page took
0.023827 seconds
and
4
git commands to generate.