Use Black stable to format python code
[babeltrace.git] / tests / bindings / python / bt2 / test_clock_class.py
index 26571bd40bd06b470ee186c4ec79c5cd3d4e116c..04df66ad90dda31eda2b41a9cb8139b3b97b1632 100644 (file)
@@ -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 uuid
@@ -173,7 +160,7 @@ class ClockClassTestCase(unittest.TestCase):
     def test_cycles_to_ns_from_origin(self):
         def f(comp_self):
             return comp_self._create_clock_class(
-                frequency=10 ** 8, origin_is_unix_epoch=True
+                frequency=10**8, origin_is_unix_epoch=True
             )
 
         cc = run_in_component_init(f)
@@ -185,7 +172,7 @@ class ClockClassTestCase(unittest.TestCase):
 
         cc = run_in_component_init(f)
         with self.assertRaises(bt2._OverflowError):
-            cc.cycles_to_ns_from_origin(2 ** 63)
+            cc.cycles_to_ns_from_origin(2**63)
 
     def test_create_uuid(self):
         def f(comp_self):
@@ -247,7 +234,7 @@ class ClockSnapshotTestCase(unittest.TestCase):
         self._cc = _cc
 
         class MyIter(bt2._UserMessageIterator):
-            def __init__(self, self_port_output):
+            def __init__(self, config, self_port_output):
                 self._at = 0
 
             def __next__(self):
@@ -256,7 +243,7 @@ class ClockSnapshotTestCase(unittest.TestCase):
                 elif self._at == 1:
                     notif = self._create_event_message(_ec, _stream, 123)
                 elif self._at == 2:
-                    notif = self._create_event_message(_ec, _stream, 2 ** 63)
+                    notif = self._create_event_message(_ec, _stream, 2**63)
                 elif self._at == 3:
                     notif = self._create_stream_end_message(_stream)
                 else:
This page took 0.024819 seconds and 4 git commands to generate.