lib: move trace class's name, UUID, and environment props to trace API
[babeltrace.git] / tests / bindings / python / bt2 / test_trace_class.py
index 4f19b4a2bc8c173d9986ab68119a93600fe232b8..1b4b2a7ee30a939d48c2163786f0d9d08a3cbff5 100644 (file)
@@ -1,4 +1,21 @@
-import uuid
+#
+# 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
 from utils import run_in_component_init, get_default_trace_class
@@ -13,18 +30,8 @@ class TraceClassTestCase(unittest.TestCase):
         tc = run_in_component_init(f)
 
         self.assertEqual(len(tc), 0)
-        self.assertEqual(len(tc.env), 0)
-        self.assertIsNone(tc.uuid)
         self.assertTrue(tc.assigns_automatic_stream_class_id)
 
-    def test_uuid(self):
-        def f(comp_self):
-            return comp_self._create_trace_class(uuid=uuid.UUID('da7d6b6f-3108-4706-89bd-ab554732611b'))
-
-        tc = run_in_component_init(f)
-
-        self.assertEqual(tc.uuid, uuid.UUID('da7d6b6f-3108-4706-89bd-ab554732611b'))
-
     def test_automatic_stream_class_id(self):
         def f(comp_self):
             return comp_self._create_trace_class(assigns_automatic_stream_class_id=True)
@@ -69,24 +76,6 @@ class TraceClassTestCase(unittest.TestCase):
         with self.assertRaises(ValueError):
             tc.create_stream_class()
 
-    def test_env_get(self):
-        def f(comp_self):
-            return comp_self._create_trace_class(env={'hello': 'you', 'foo': -5})
-
-        tc = run_in_component_init(f)
-
-        self.assertEqual(tc.env['hello'], 'you')
-        self.assertEqual(tc.env['foo'], -5)
-
-    def test_env_get_non_existent(self):
-        def f(comp_self):
-            return comp_self._create_trace_class(env={'hello': 'you', 'foo': -5})
-
-        tc = run_in_component_init(f)
-
-        with self.assertRaises(KeyError):
-            tc.env['lel']
-
     @staticmethod
     def _create_trace_class_with_some_stream_classes():
         def f(comp_self):
@@ -122,7 +111,7 @@ class TraceClassTestCase(unittest.TestCase):
         tc, sc1, sc2, sc3 = self._create_trace_class_with_some_stream_classes()
 
         for sc_id, stream_class in tc.items():
-            self.assertIsInstance(stream_class, bt2.stream_class.StreamClass)
+            self.assertIsInstance(stream_class, bt2.stream_class._StreamClass)
 
             if sc_id == 12:
                 self.assertEqual(stream_class.addr, sc1.addr)
This page took 0.023885 seconds and 4 git commands to generate.