tests: remove test_ctf_writer_clock.py
authorSimon Marchi <simon.marchi@efficios.com>
Tue, 15 Oct 2019 20:48:40 +0000 (16:48 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 17 Oct 2019 16:13:27 +0000 (12:13 -0400)
Commit 0fd756a43bce605875565a14c1ed1b070fa3ad94 ("Remove everything
related to the `bt2.ctf_writer` Python module") removed the Python
bindings for the CTF writer.

A corresponding test is still there, but skipped.  I think it can be
removed as well.

Change-Id: I04091a0bc3f04a87c01947956108d83006d9330b
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2204
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Tested-by: jenkins <jenkins@lttng.org>
tests/Makefile.am
tests/bindings/python/bt2/test_ctf_writer_clock.py [deleted file]

index 1550d22909e28fe08a81dc253566486ce93216f1..542b06c8ba428977bb3f3f5e4e4efd38aa6a4b68 100644 (file)
@@ -16,7 +16,6 @@ dist_check_SCRIPTS = \
        bindings/python/bt2/test_component_class.py \
        bindings/python/bt2/test_component.py \
        bindings/python/bt2/test_connection.py \
-       bindings/python/bt2/test_ctf_writer_clock.py \
        bindings/python/bt2/test_event_class.py \
        bindings/python/bt2/test_event.py \
        bindings/python/bt2/test_field_class.py \
diff --git a/tests/bindings/python/bt2/test_ctf_writer_clock.py b/tests/bindings/python/bt2/test_ctf_writer_clock.py
deleted file mode 100644 (file)
index 237a801..0000000
+++ /dev/null
@@ -1,308 +0,0 @@
-#
-# 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
-import copy
-import bt2
-
-
-@unittest.skip("this is broken")
-class CtfWriterClockTestCase(unittest.TestCase):
-    def setUp(self):
-        self._clock = bt2.CtfWriterClock('salut')
-
-    def tearDown(self):
-        del self._clock
-
-    def test_create_default(self):
-        self.assertEqual(self._clock.name, 'salut')
-
-    def test_create_invalid_no_name(self):
-        with self.assertRaises(TypeError):
-            bt2.CtfWriterClock()
-
-    def test_create_full(self):
-        my_uuid = uuid.uuid1()
-        cc = bt2.CtfWriterClock(
-            name='name',
-            description='some description',
-            frequency=1001,
-            precision=176,
-            offset=bt2.ClockClassOffset(45, 3003),
-            is_absolute=True,
-            uuid=my_uuid,
-        )
-        self.assertEqual(cc.name, 'name')
-        self.assertEqual(cc.description, 'some description')
-        self.assertEqual(cc.frequency, 1001)
-        self.assertEqual(cc.precision, 176)
-        self.assertEqual(cc.offset, bt2.ClockClassOffset(45, 3003))
-        self.assertEqual(cc.is_absolute, True)
-        self.assertEqual(cc.uuid, copy.deepcopy(my_uuid))
-
-    def test_assign_description(self):
-        self._clock.description = 'hi people'
-        self.assertEqual(self._clock.description, 'hi people')
-
-    def test_assign_invalid_description(self):
-        with self.assertRaises(TypeError):
-            self._clock.description = 23
-
-    def test_assign_frequency(self):
-        self._clock.frequency = 987654321
-        self.assertEqual(self._clock.frequency, 987654321)
-
-    def test_assign_invalid_frequency(self):
-        with self.assertRaises(TypeError):
-            self._clock.frequency = 'lel'
-
-    def test_assign_precision(self):
-        self._clock.precision = 12
-        self.assertEqual(self._clock.precision, 12)
-
-    def test_assign_invalid_precision(self):
-        with self.assertRaises(TypeError):
-            self._clock.precision = 'lel'
-
-    def test_assign_offset(self):
-        self._clock.offset = bt2.ClockClassOffset(12, 56)
-        self.assertEqual(self._clock.offset, bt2.ClockClassOffset(12, 56))
-
-    def test_assign_invalid_offset(self):
-        with self.assertRaises(TypeError):
-            self._clock.offset = object()
-
-    def test_assign_absolute(self):
-        self._clock.is_absolute = True
-        self.assertTrue(self._clock.is_absolute)
-
-    def test_assign_invalid_absolute(self):
-        with self.assertRaises(TypeError):
-            self._clock.is_absolute = 23
-
-    def test_assign_uuid(self):
-        the_uuid = uuid.uuid1()
-        self._clock.uuid = the_uuid
-        self.assertEqual(self._clock.uuid, the_uuid)
-
-    def test_assign_invalid_uuid(self):
-        with self.assertRaises(TypeError):
-            self._clock.uuid = object()
-
-    def test_assign_time(self):
-        self._clock.time = 41232
-
-    def test_assign_invalid_time(self):
-        with self.assertRaises(TypeError):
-            self._clock.time = object()
-
-    def _test_copy(self, cpy):
-        self.assertIsNot(cpy, self._clock)
-        self.assertNotEqual(cpy.addr, self._clock.addr)
-        self.assertEqual(cpy, self._clock)
-
-    def test_copy(self):
-        cpy = copy.copy(self._clock)
-        self._test_copy(cpy)
-
-    def test_deepcopy(self):
-        cpy = copy.deepcopy(self._clock)
-        self._test_copy(cpy)
-
-    def test_eq(self):
-        my_uuid = uuid.uuid1()
-        cc1 = bt2.CtfWriterClock(
-            name='name',
-            description='some description',
-            frequency=1001,
-            precision=176,
-            offset=bt2.ClockClassOffset(45, 3003),
-            is_absolute=True,
-            uuid=my_uuid,
-        )
-        cc2 = bt2.CtfWriterClock(
-            name='name',
-            description='some description',
-            frequency=1001,
-            precision=176,
-            offset=bt2.ClockClassOffset(45, 3003),
-            is_absolute=True,
-            uuid=my_uuid,
-        )
-        self.assertEqual(cc1, cc2)
-
-    def test_ne_name(self):
-        my_uuid = uuid.uuid1()
-        cc1 = bt2.CtfWriterClock(
-            name='mane',
-            description='some description',
-            frequency=1001,
-            precision=176,
-            offset=bt2.ClockClassOffset(45, 3003),
-            is_absolute=True,
-            uuid=my_uuid,
-        )
-        cc2 = bt2.CtfWriterClock(
-            name='name',
-            description='some description',
-            frequency=1001,
-            precision=176,
-            offset=bt2.ClockClassOffset(45, 3003),
-            is_absolute=True,
-            uuid=my_uuid,
-        )
-        self.assertNotEqual(cc1, cc2)
-
-    def test_ne_description(self):
-        my_uuid = uuid.uuid1()
-        cc1 = bt2.CtfWriterClock(
-            name='name',
-            description='some descripti2',
-            frequency=1001,
-            precision=176,
-            offset=bt2.ClockClassOffset(45, 3003),
-            is_absolute=True,
-            uuid=my_uuid,
-        )
-        cc2 = bt2.CtfWriterClock(
-            name='name',
-            description='some description',
-            frequency=1001,
-            precision=176,
-            offset=bt2.ClockClassOffset(45, 3003),
-            is_absolute=True,
-            uuid=my_uuid,
-        )
-        self.assertNotEqual(cc1, cc2)
-
-    def test_ne_frequency(self):
-        my_uuid = uuid.uuid1()
-        cc1 = bt2.CtfWriterClock(
-            name='name',
-            description='some description',
-            frequency=1003,
-            precision=176,
-            offset=bt2.ClockClassOffset(45, 3003),
-            is_absolute=True,
-            uuid=my_uuid,
-        )
-        cc2 = bt2.CtfWriterClock(
-            name='name',
-            description='some description',
-            frequency=1001,
-            precision=176,
-            offset=bt2.ClockClassOffset(45, 3003),
-            is_absolute=True,
-            uuid=my_uuid,
-        )
-        self.assertNotEqual(cc1, cc2)
-
-    def test_ne_precision(self):
-        my_uuid = uuid.uuid1()
-        cc1 = bt2.CtfWriterClock(
-            name='name',
-            description='some description',
-            frequency=1001,
-            precision=171,
-            offset=bt2.ClockClassOffset(45, 3003),
-            is_absolute=True,
-            uuid=my_uuid,
-        )
-        cc2 = bt2.CtfWriterClock(
-            name='name',
-            description='some description',
-            frequency=1001,
-            precision=176,
-            offset=bt2.ClockClassOffset(45, 3003),
-            is_absolute=True,
-            uuid=my_uuid,
-        )
-        self.assertNotEqual(cc1, cc2)
-
-    def test_ne_offset(self):
-        my_uuid = uuid.uuid1()
-        cc1 = bt2.CtfWriterClock(
-            name='name',
-            description='some description',
-            frequency=1001,
-            precision=176,
-            offset=bt2.ClockClassOffset(45, 3001),
-            is_absolute=True,
-            uuid=my_uuid,
-        )
-        cc2 = bt2.CtfWriterClock(
-            name='name',
-            description='some description',
-            frequency=1001,
-            precision=176,
-            offset=bt2.ClockClassOffset(45, 3003),
-            is_absolute=True,
-            uuid=my_uuid,
-        )
-        self.assertNotEqual(cc1, cc2)
-
-    def test_ne_absolute(self):
-        my_uuid = uuid.uuid1()
-        cc1 = bt2.CtfWriterClock(
-            name='name',
-            description='some description',
-            frequency=1001,
-            precision=176,
-            offset=bt2.ClockClassOffset(45, 3003),
-            is_absolute=True,
-            uuid=my_uuid,
-        )
-        cc2 = bt2.CtfWriterClock(
-            name='name',
-            description='some description',
-            frequency=1001,
-            precision=176,
-            offset=bt2.ClockClassOffset(45, 3003),
-            is_absolute=False,
-            uuid=my_uuid,
-        )
-        self.assertNotEqual(cc1, cc2)
-
-    def test_ne_uuid(self):
-        cc1 = bt2.CtfWriterClock(
-            name='name',
-            description='some description',
-            frequency=1001,
-            precision=176,
-            offset=bt2.ClockClassOffset(45, 3003),
-            is_absolute=True,
-            uuid=uuid.uuid1(),
-        )
-        cc2 = bt2.CtfWriterClock(
-            name='name',
-            description='some description',
-            frequency=1001,
-            precision=176,
-            offset=bt2.ClockClassOffset(45, 3003),
-            is_absolute=True,
-            uuid=uuid.uuid1(),
-        )
-        self.assertNotEqual(cc1, cc2)
-
-    def test_eq_invalid(self):
-        self.assertFalse(self._clock == 23)
-
-
-if __name__ == '__main__':
-    unittest.main()
This page took 0.027446 seconds and 4 git commands to generate.