lib: bt_graph_create(): accept MIP version
[babeltrace.git] / tests / bindings / python / bt2 / test_graph.py
index 0c9d9279851ed2ae0f335767fee928f5cee66448..b719d9ca133e7b6956e7bbdb72a0bfc257f4ae01 100644 (file)
@@ -51,8 +51,19 @@ class GraphTestCase(unittest.TestCase):
     def tearDown(self):
         del self._graph
 
-    def test_create_empty(self):
-        graph = bt2.Graph()
+    def test_create_default(self):
+        bt2.Graph()
+
+    def test_create_known_mip_version(self):
+        bt2.Graph(0)
+
+    def test_create_invalid_mip_version_type(self):
+        with self.assertRaises(TypeError):
+            bt2.Graph('')
+
+    def test_create_unknown_mip_version(self):
+        with self.assertRaisesRegex(ValueError, 'unknown MIP version'):
+            bt2.Graph(1)
 
     def test_add_component_user_cls(self):
         class MySink(bt2._UserSinkComponent):
This page took 0.023502 seconds and 4 git commands to generate.