bt2: Adapt test_clock_class.py and make it pass
This patch adapts test_clock_class to the current BT API and changes
what's needed to make it pass.
One change in test_clock_class is that clock classes need to be created
from self components now, so it requires a bit more boilerplate.
Everthing related to equality, copy and deepcopy is removed from
ClockClass. However, it remains possible to test a _ClockSnapshot for
equality against an integer. I thoough it would be useful to support
other relational operations (<, <=, >, >=) for clock snapshots, so I
added support for them using functools.total_ordering.
The constructors for both _ClockSnapshot and ClockClass are removed, as
the user never directly creates those objects anymore. Clock snapshots
are obtained from messages, while clock classes are created using the
_create_clock_class method of a component.
As in previous patches, the public setters are removed, as we only
support setting properies when creating an object.
Change-Id: I7228b32530f98811cb512243469ae7d0d61a9da1
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/+/1299
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Tested-by: jenkins
This page took 0.029267 seconds and 5 git commands to generate.