tests: test_field.py: enable tests using _test_binop_lhs_value_same
[babeltrace.git] / tests / bindings / python / bt2 / test_field.py
index 2af55fb241dd46a5d703bafd644cf0738693f5a1..99532e1005ba537ede48ec63d2a1ac70f1dcb18c 100644 (file)
@@ -24,11 +24,7 @@ import copy
 import itertools
 import collections
 import bt2
-from utils import (
-    get_default_trace_class,
-    TestOutputPortMessageIterator,
-    create_const_field,
-)
+from utils import get_default_trace_class, create_const_field
 
 
 _COMP_BINOPS = (operator.eq, operator.ne)
@@ -327,9 +323,8 @@ class _TestNumericField:
 
     # Tests that the binary operation `op`, when applied to `self._def`,
     # does not change its value.
-    @unittest.skip('copy is not implemented')
     def _test_binop_lhs_value_same(self, op, rhs):
-        value_before = copy.copy(self._def)
+        value_before = copy.copy(self._def_value)
         r, rv = self._binop(op, rhs)
         self.assertEqual(self._def, value_before)
 
@@ -2194,7 +2189,9 @@ class OptionFieldTestCase(unittest.TestCase):
         field.value = {'opt_field': 'hiboux'}
 
     def _create_fc(self, tc):
-        fc = tc.create_option_field_class(tc.create_string_field_class())
+        fc = tc.create_option_without_selector_field_class(
+            tc.create_string_field_class()
+        )
         top_fc = tc.create_structure_field_class()
         top_fc.append_member('opt_field', fc)
         return top_fc
This page took 0.02482 seconds and 4 git commands to generate.