bt2: add `if __name__ == '__main__'` snippet to all tests
[babeltrace.git] / tests / bindings / python / bt2 / test_error.py
index 11328db7b1814e427dd56b3123028e4baa866866..821d30f5a25b485edfbc1b58c43d6b44f1cde620 100644 (file)
@@ -88,7 +88,7 @@ class ErrorTestCase(unittest.TestCase):
     def test_current_thread_error_none(self):
         # When a bt2._Error is raised, it steals the current thread's error.
         # Verify that it is now NULL.
-        exc = self._run_failing_graph(SourceWithFailingInit, WorkingSink)
+        self._run_failing_graph(SourceWithFailingInit, WorkingSink)
         self.assertIsNone(native_bt.current_thread_take_error())
 
     def test_len(self):
@@ -204,3 +204,7 @@ class ErrorTestCase(unittest.TestCase):
         self.assertEqual(cause.component_class_type, bt2.ComponentClassType.SOURCE)
         self.assertEqual(cause.component_class_name, 'SourceWithFailingIter')
         self.assertIsNone(cause.plugin_name)
+
+
+if __name__ == '__main__':
+    unittest.main()
This page took 0.025252 seconds and 4 git commands to generate.