From: Simon Marchi Date: Mon, 3 Jun 2019 22:41:45 +0000 (-0400) Subject: bt2: Adapt test_clock_class.py and make it pass X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=be7bbff934d18e407853436dd9f7da23c8c20743;hp=be7bbff934d18e407853436dd9f7da23c8c20743;p=babeltrace.git 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 Signed-off-by: Francis Deslauriers Reviewed-on: https://review.lttng.org/c/babeltrace/+/1299 Reviewed-by: Philippe Proulx Tested-by: jenkins ---