test_{field,value}.py: test complex number RHS for binary operations
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Sat, 29 Jun 2019 16:16:38 +0000 (12:16 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 3 Jul 2019 01:31:27 +0000 (21:31 -0400)
commit00512c974abe06c4de9a25181eb22c0b35047a9b
tree31b08a974a794c82f141a7c75327b892778909c8
parent88be7fa478624859d8e94de937b7ea21a1bb45c2
test_{field,value}.py: test complex number RHS for binary operations

This patch adds injected tests for numeric field and value test cases in
which the RHS operand of the tested binary operations is a complex
number, both `-23+19j` and `0j`.

This is to ensure that a binary operator applied to a field object or a
value object and a Python complex number returns what's expected by the
langage, so you can do:

    print(my_field + 8+4.2j)

if you wish.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I5cade062e285752d0a917a8b751824b0ebc97f16
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1587
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
tests/bindings/python/bt2/test_field.py
tests/bindings/python/bt2/test_value.py
This page took 0.024133 seconds and 4 git commands to generate.