bt2: Adapt test_field.py and make it pass
authorSimon Marchi <simon.marchi@efficios.com>
Tue, 21 May 2019 21:01:59 +0000 (17:01 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 5 Jun 2019 17:47:34 +0000 (13:47 -0400)
commit1eccc498917f855490876fc8b3e41f90f89f1c6d
tree61189f267341e60f19a7f9cffd7df4313e870afd
parentd47b87ac209ea8f1b98b7e6cf209dfd4bf9cc9c0
bt2: Adapt test_field.py and make it pass

Update test_field.py and field.py to match the current API of
Babeltrace.

In the test, most changes are related to the fact that field classes and
fields are created ultimately from a trace class.  A bunch of helpers
are added at the top, which allow to easily create a field of a certain
type without repeating the boilerplate.

Anything related to copy and deepcopy is removed.  However, the test
_TestNumericField._test_binop_lhs_value_same relies on copy support, so
I am not too sure what to do with it.  I have currently marked it as
skipped, but we should either adapt it or remove it.

A concept that disappeared (or rather, is not exposed by the public API)
is whether a field is set or not, and the ability to reset a field's
value.  All tests and code related to that are removed.

Change-Id: I27f1ee6a3a2152232556d9d9c301de8411189a2c
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/+/1323
Tested-by: jenkins
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
bindings/python/bt2/bt2/__init__.py.in
bindings/python/bt2/bt2/field.py
bindings/python/bt2/bt2/native_bt_field.i
tests/bindings/python/bt2/test_field.py
This page took 0.025237 seconds and 4 git commands to generate.