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)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 13 Jun 2019 21:24:21 +0000 (17:24 -0400)
commit4470d3a6fec465dcf612e044ef0b11b040b1a5f1
treef40e6a3b6b0468fb9fbf607f9e82ef0cda3ccfec
parentc8820b76331010bc3b430847097e2a29508185b1
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.025138 seconds and 4 git commands to generate.