bt2: Adapt test_packet.py and make it pass
authorSimon Marchi <simon.marchi@efficios.com>
Tue, 14 May 2019 19:38:58 +0000 (15:38 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 13 Jun 2019 21:24:21 +0000 (17:24 -0400)
commite8d2391b417ae492d27f378f215cb53833084f78
tree114d63b2c66ed7b2acdd70bef1e4010fad59579d
parent4a5ca9689009b1defd6f4e265ac92f89d6f9d90b
bt2: Adapt test_packet.py and make it pass

This patch updates test_packet.py and packet.py to work with the current
API.

In both files, everything about equality, copy, deep copy and header
fields is removed.  The setter for context_field is also removed.

One side-effect change (required for the test) is in the
Field.field_class property.  Previously, when creating a Field object
wrapping a bt_field pointer, we would create the corresponding
FieldClass object and store it in Field._field_class.  Instead, we can
compute it as needed in the Field.field_class property, I don't really
see any problem with that.

Change-Id: I509b3bd272fb323ed6df7de47d21c31b8aedc72f
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1301
Tested-by: jenkins
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
bindings/python/bt2/bt2/field.py
bindings/python/bt2/bt2/packet.py
tests/bindings/python/bt2/test_packet.py
This page took 0.025779 seconds and 4 git commands to generate.