test_plugin.py: do not search in user/system directories for tests
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Sun, 11 Aug 2019 15:33:40 +0000 (11:33 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 12 Aug 2019 05:25:18 +0000 (01:25 -0400)
In `test_plugin.py`, make bt2.find_plugin() not search in user and
system directories so that it needs to find the specific plugin in the
test's search path (given by `BABELTRACE_PLUGIN_PATH`) or fail.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I9bad521d079ce602fa152d9e24ab6b145e8edce9
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1880
Tested-by: jenkins <jenkins@lttng.org>
tests/bindings/python/bt2/test_plugin.py

index e37e5ee67b2cc1f62ee685ad4856907c233aaf45..9e04b401b690bdae1480212f10ae23a84dcdcb4d 100644 (file)
@@ -84,7 +84,9 @@ class FindPluginTestCase(unittest.TestCase):
 
 class PluginTestCase(unittest.TestCase):
     def setUp(self):
-        self._plugin = bt2.find_plugin('ctf')
+        self._plugin = bt2.find_plugin(
+            'ctf', find_in_user_dir=False, find_in_sys_dir=False
+        )
 
     def tearDown(self):
         del self._plugin
@@ -131,7 +133,7 @@ class PluginTestCase(unittest.TestCase):
         self.assertEqual(plugins['lttng-live'].name, 'lttng-live')
 
     def test_filter_comp_classes_len(self):
-        plugin = bt2.find_plugin('utils')
+        plugin = bt2.find_plugin('utils', find_in_user_dir=False, find_in_sys_dir=False)
         self.assertEqual(len(plugin.filter_component_classes), 2)
 
     def test_sink_comp_classes_len(self):
This page took 0.025435 seconds and 4 git commands to generate.