tests: bt2: remove test_clock_class_priority_map.py
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Sat, 13 Jul 2019 12:21:50 +0000 (08:21 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Sat, 13 Jul 2019 14:45:26 +0000 (10:45 -0400)
The clock class priority map concept does not exist anymore and all the
testcases were marked as `skip` since then.

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: Ib8e7d03662420f02446c5f901e86cf89fe09a09a
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1702
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
tests/Makefile.am
tests/bindings/python/bt2/test_clock_class_priority_map.py [deleted file]

index 86fad69faba51db876cd8df52b36c6a414b51651..4bb87daa69a8e1058e635aec202c2a80be876d08 100644 (file)
@@ -5,7 +5,6 @@ EXTRA_DIST = $(srcdir)/data \
             bindings/python/bt2/.coveragerc
 
 dist_check_SCRIPTS = \
-       bindings/python/bt2/test_clock_class_priority_map.py \
        bindings/python/bt2/test_clock_class.py \
        bindings/python/bt2/test_component_class.py \
        bindings/python/bt2/test_component.py \
diff --git a/tests/bindings/python/bt2/test_clock_class_priority_map.py b/tests/bindings/python/bt2/test_clock_class_priority_map.py
deleted file mode 100644 (file)
index f953fd5..0000000
+++ /dev/null
@@ -1,158 +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 ClockClassPriorityMapTestCase(unittest.TestCase):
-    def test_create_empty(self):
-        cc_prio_map = bt2.ClockClassPriorityMap()
-        self.assertEqual(len(cc_prio_map), 0)
-        self.assertIsNone(cc_prio_map.highest_priority_clock_class)
-
-    def test_create_full(self):
-        cc1 = bt2.ClockClass('meow', 1234)
-        cc2 = bt2.ClockClass('mix', 5678)
-        cc_prio_map = bt2.ClockClassPriorityMap({cc1: 17, cc2: 2})
-        self.assertEqual(len(cc_prio_map), 2)
-        self.assertEqual(cc_prio_map[cc1], 17)
-        self.assertEqual(cc_prio_map[cc2], 2)
-        self.assertEqual(cc_prio_map.highest_priority_clock_class, cc2)
-
-    def test_setitem(self):
-        cc_prio_map = bt2.ClockClassPriorityMap()
-        cc1 = bt2.ClockClass('mix', 5678)
-        cc_prio_map[cc1] = 184
-        self.assertEqual(len(cc_prio_map), 1)
-        self.assertEqual(cc_prio_map[cc1], 184)
-        self.assertEqual(cc_prio_map.highest_priority_clock_class, cc1)
-
-    def test_setitem_wrong_key_type(self):
-        cc_prio_map = bt2.ClockClassPriorityMap()
-
-        with self.assertRaises(TypeError):
-            cc_prio_map['the clock'] = 184
-
-    def test_setitem_wrong_value_type(self):
-        cc_prio_map = bt2.ClockClassPriorityMap()
-        cc1 = bt2.ClockClass('mix', 5678)
-
-        with self.assertRaises(TypeError):
-            cc_prio_map[cc1] = 'priority'
-
-    def test_getitem_wrong_key(self):
-        cc_prio_map = bt2.ClockClassPriorityMap()
-        cc1 = bt2.ClockClass('mix', 5678)
-        cc2 = bt2.ClockClass('mix', 5678)
-        cc_prio_map[cc1] = 2
-
-        with self.assertRaises(KeyError):
-            cc_prio_map[cc2]
-
-    def test_getitem_wrong_key_type(self):
-        cc_prio_map = bt2.ClockClassPriorityMap()
-
-        with self.assertRaises(TypeError):
-            cc_prio_map[23]
-
-    def test_iter(self):
-        cc1 = bt2.ClockClass('meow', 1234)
-        cc2 = bt2.ClockClass('mix', 5678)
-        cc3 = bt2.ClockClass('lel', 1548)
-        cc_prio_map = bt2.ClockClassPriorityMap({cc1: 17, cc2: 2, cc3: 25})
-        cc_prios = {}
-
-        for cc, prio in cc_prio_map.items():
-            cc_prios[cc] = prio
-
-        self.assertEqual(len(cc_prios), 3)
-        self.assertEqual(cc_prios[cc1], 17)
-        self.assertEqual(cc_prios[cc2], 2)
-        self.assertEqual(cc_prios[cc3], 25)
-
-    def test_eq(self):
-        cc1 = bt2.ClockClass('meow', 1234)
-        cc2 = bt2.ClockClass('mix', 5678)
-        cc3 = bt2.ClockClass('lel', 1548)
-        cc_prio_map = bt2.ClockClassPriorityMap({cc1: 17, cc2: 2, cc3: 25})
-        other_cc1 = bt2.ClockClass('meow', 1234)
-        other_cc2 = bt2.ClockClass('mix', 5678)
-        other_cc3 = bt2.ClockClass('lel', 1548)
-        other_cc_prio_map = bt2.ClockClassPriorityMap({other_cc1: 17, other_cc2: 2, other_cc3: 25})
-        self.assertEqual(cc_prio_map, other_cc_prio_map)
-
-    def test_ne_clock_class(self):
-        cc1 = bt2.ClockClass('meow', 1234)
-        cc2 = bt2.ClockClass('mix', 5678)
-        cc3 = bt2.ClockClass('lel', 1548)
-        cc_prio_map = bt2.ClockClassPriorityMap({cc1: 17, cc2: 2, cc3: 25})
-        other_cc1 = bt2.ClockClass('meow', 1234)
-        other_cc2 = bt2.ClockClass('coucou', 5678)
-        other_cc3 = bt2.ClockClass('lel', 1548)
-        other_cc_prio_map = bt2.ClockClassPriorityMap({other_cc1: 17, other_cc2: 2, other_cc3: 25})
-        self.assertNotEqual(cc_prio_map, other_cc_prio_map)
-
-    def test_ne_prio(self):
-        cc1 = bt2.ClockClass('meow', 1234)
-        cc2 = bt2.ClockClass('mix', 5678)
-        cc3 = bt2.ClockClass('lel', 1548)
-        cc_prio_map = bt2.ClockClassPriorityMap({cc1: 17, cc2: 2, cc3: 25})
-        other_cc1 = bt2.ClockClass('meow', 1234)
-        other_cc2 = bt2.ClockClass('mix', 5678)
-        other_cc3 = bt2.ClockClass('lel', 1548)
-        other_cc_prio_map = bt2.ClockClassPriorityMap({other_cc1: 17, other_cc2: 3, other_cc3: 25})
-        self.assertNotEqual(cc_prio_map, other_cc_prio_map)
-
-    def test_eq_invalid(self):
-        self.assertFalse(bt2.ClockClassPriorityMap() == 23)
-
-    def test_copy(self):
-        cc1 = bt2.ClockClass('meow', 1234)
-        cc2 = bt2.ClockClass('mix', 5678)
-        cc3 = bt2.ClockClass('lel', 1548)
-        cc_prio_map = bt2.ClockClassPriorityMap({cc1: 17, cc2: 2, cc3: 25})
-        cc_prio_map_cpy = copy.copy(cc_prio_map)
-        self.assertEqual(cc_prio_map, cc_prio_map_cpy)
-        self.assertEqual(list(cc_prio_map.keys())[0].addr, list(cc_prio_map_cpy.keys())[0].addr)
-        self.assertEqual(list(cc_prio_map.keys())[1].addr, list(cc_prio_map_cpy.keys())[1].addr)
-        self.assertEqual(list(cc_prio_map.keys())[2].addr, list(cc_prio_map_cpy.keys())[2].addr)
-        self.assertEqual(list(cc_prio_map.values())[0], list(cc_prio_map_cpy.values())[0])
-        self.assertEqual(list(cc_prio_map.values())[1], list(cc_prio_map_cpy.values())[1])
-        self.assertEqual(list(cc_prio_map.values())[2], list(cc_prio_map_cpy.values())[2])
-        self.assertEqual(cc_prio_map.highest_priority_clock_class.addr,
-                         cc_prio_map_cpy.highest_priority_clock_class.addr)
-
-    def test_deep_copy(self):
-        cc1 = bt2.ClockClass('meow', 1234)
-        cc2 = bt2.ClockClass('mix', 5678)
-        cc3 = bt2.ClockClass('lel', 1548)
-        cc_prio_map = bt2.ClockClassPriorityMap({cc1: 17, cc2: 2, cc3: 25})
-        cc_prio_map_cpy = copy.deepcopy(cc_prio_map)
-        self.assertEqual(cc_prio_map, cc_prio_map_cpy)
-        self.assertNotEqual(list(cc_prio_map.keys())[0].addr, list(cc_prio_map_cpy.keys())[0].addr)
-        self.assertNotEqual(list(cc_prio_map.keys())[1].addr, list(cc_prio_map_cpy.keys())[1].addr)
-        self.assertNotEqual(list(cc_prio_map.keys())[2].addr, list(cc_prio_map_cpy.keys())[2].addr)
-        self.assertEqual(list(cc_prio_map.values())[0], list(cc_prio_map_cpy.values())[0])
-        self.assertEqual(list(cc_prio_map.values())[1], list(cc_prio_map_cpy.values())[1])
-        self.assertEqual(list(cc_prio_map.values())[2], list(cc_prio_map_cpy.values())[2])
-        self.assertNotEqual(cc_prio_map.highest_priority_clock_class.addr,
-                            cc_prio_map_cpy.highest_priority_clock_class.addr)
This page took 0.025635 seconds and 4 git commands to generate.