Esempio n. 1
0
 def test_const_iter(self):
     const_tc = get_const_stream_beginning_message().stream.trace.cls
     const_sc = list(const_tc.values())[0]
     self.assertIs(type(const_sc), bt2_stream_class._StreamClassConst)
Esempio n. 2
0
 def test_const_trace(self):
     stream = utils.get_const_stream_beginning_message().stream
     self.assertIs(type(stream.trace), bt2_trace._TraceConst)
Esempio n. 3
0
 def test_const_getitem(self):
     const_tc = get_const_stream_beginning_message().stream.trace.cls
     self.assertIs(type(const_tc[0]), bt2_stream_class._StreamClassConst)
Esempio n. 4
0
 def test_const_user_attributes(self):
     stream = utils.get_const_stream_beginning_message().stream
     self.assertEqual(stream.user_attributes, {'salut': 23})
     self.assertIs(type(stream.user_attributes), bt2_value._MapValueConst)
Esempio n. 5
0
 def test_const_stream_class(self):
     stream = utils.get_const_stream_beginning_message().stream
     self.assertIs(type(stream.cls), bt2_stream_class._StreamClassConst)
Esempio n. 6
0
 def test_const_env_set(self):
     trace = utils.get_const_stream_beginning_message().stream.trace
     with self.assertRaises(TypeError):
         trace.environment['patate'] = 33
Esempio n. 7
0
 def test_const_env_iter(self):
     trace = utils.get_const_stream_beginning_message().stream.trace
     values = set(trace.environment)
     self.assertEqual(values, {'patate'})
Esempio n. 8
0
 def test_const_env_get(self):
     trace = utils.get_const_stream_beginning_message().stream.trace
     self.assertIs(type(trace.environment),
                   bt2_trace._TraceEnvironmentConst)
     self.assertIs(type(trace.environment['patate']),
                   bt2_value._SignedIntegerValueConst)
Esempio n. 9
0
 def test_const_attr_trace_class(self):
     trace = utils.get_const_stream_beginning_message().stream.trace
     self.assertIs(type(trace.cls), bt2_trace_class._TraceClassConst)
Esempio n. 10
0
 def test_const_getitem(self):
     trace = utils.get_const_stream_beginning_message().stream.trace
     self.assertIs(type(trace[0]), bt2_stream._StreamConst)