X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=tests%2Fbindings%2Fpython%2Fbt2%2Ftest_component_descriptor.py;h=818b245eb716e62a08386483378fb2d986e7ae22;hb=f5567ea88d172767b34373bc6e402da8bfd85ef8;hp=a980d80f2984f8bce4d61da43f831490ce9823ae;hpb=d14ddbbab48ce07804d4252228fceee692d5dea4;p=babeltrace.git diff --git a/tests/bindings/python/bt2/test_component_descriptor.py b/tests/bindings/python/bt2/test_component_descriptor.py index a980d80f..818b245e 100644 --- a/tests/bindings/python/bt2/test_component_descriptor.py +++ b/tests/bindings/python/bt2/test_component_descriptor.py @@ -1,20 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2019 EfficiOS Inc. # -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; only version 2 -# of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# import unittest import bt2 @@ -28,12 +15,12 @@ class _DummySink(bt2._UserSinkComponent): class ComponentDescriptorTestCase(unittest.TestCase): def setUp(self): self._obj = object() - self._comp_descr = bt2.ComponentDescriptor(_DummySink, {'zoom': -23}, self._obj) + self._comp_descr = bt2.ComponentDescriptor(_DummySink, {"zoom": -23}, self._obj) def _get_comp_cls_from_plugin(self): - plugin = bt2.find_plugin('text', find_in_user_dir=False, find_in_sys_dir=False) + plugin = bt2.find_plugin("text", find_in_user_dir=False, find_in_sys_dir=False) assert plugin is not None - cc = plugin.source_component_classes['dmesg'] + cc = plugin.source_component_classes["dmesg"] assert cc is not None return cc @@ -62,11 +49,11 @@ class ComponentDescriptorTestCase(unittest.TestCase): self.assertIs(self._comp_descr.component_class, _DummySink) def test_attr_params(self): - self.assertEqual(self._comp_descr.params, {'zoom': -23}) + self.assertEqual(self._comp_descr.params, {"zoom": -23}) def test_attr_obj(self): self.assertIs(self._comp_descr.obj, self._obj) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main()