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)
def test_const_trace(self): stream = utils.get_const_stream_beginning_message().stream self.assertIs(type(stream.trace), bt2_trace._TraceConst)
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)
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)
def test_const_stream_class(self): stream = utils.get_const_stream_beginning_message().stream self.assertIs(type(stream.cls), bt2_stream_class._StreamClassConst)
def test_const_env_set(self): trace = utils.get_const_stream_beginning_message().stream.trace with self.assertRaises(TypeError): trace.environment['patate'] = 33
def test_const_env_iter(self): trace = utils.get_const_stream_beginning_message().stream.trace values = set(trace.environment) self.assertEqual(values, {'patate'})
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)
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)
def test_const_getitem(self): trace = utils.get_const_stream_beginning_message().stream.trace self.assertIs(type(trace[0]), bt2_stream._StreamConst)