Skip to content

Commit

Permalink
Fix value.py tests
Browse files Browse the repository at this point in the history
  • Loading branch information
markheik committed Aug 31, 2023
1 parent d0ca576 commit ede875d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tests/core/test_value.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,69 +55,69 @@ def test_value_from_python_types_vector_data_bytes(self, vec):
rval = value._value_from_python_types(vec).vectorData
assert rval.valueType == value.VectorValueType.BYTE_ARRAY.value
assert rval.extraHeaderInfo == 0
assert rval.vectorElementType == value.VectorElementType.UINT8.value
assert rval.vectorElementType == value._VectorElementType.UINT8.value
assert rval.data == vec

@given(arrays(dtype=np.uint8, shape=(1, 2)))
def test_value_from_python_types_vector_data_uint8(self, vec):
rval = value._value_from_python_types(vec).vectorData
assert rval.valueType == value.VectorValueType.VECTOR_DATA.value
assert rval.extraHeaderInfo == 0
assert rval.vectorElementType == value.VectorElementType.UINT8.value
assert rval.vectorElementType == value._VectorElementType.UINT8.value
assert rval.data == vec.tobytes()

@given(arrays(dtype=np.uint16, shape=(1, 2)))
def test_value_from_python_types_vector_data_uint16(self, vec):
rval = value._value_from_python_types(vec).vectorData
assert rval.valueType == value.VectorValueType.VECTOR_DATA.value
assert rval.extraHeaderInfo == 0
assert rval.vectorElementType == value.VectorElementType.UINT16.value
assert rval.vectorElementType == value._VectorElementType.UINT16.value
assert rval.data == vec.tobytes()

@given(arrays(dtype=np.uint32, shape=(1, 2)))
def test_value_from_python_types_vector_data_uint32(self, vec):
rval = value._value_from_python_types(vec).vectorData
assert rval.valueType == value.VectorValueType.VECTOR_DATA.value
assert rval.extraHeaderInfo == 0
assert rval.vectorElementType == value.VectorElementType.UINT32.value
assert rval.vectorElementType == value._VectorElementType.UINT32.value
assert rval.data == vec.tobytes()

@given(arrays(dtype=(np.uint64, int), shape=(1, 2)))
def test_value_from_python_types_vector_data_uint64(self, vec):
rval = value._value_from_python_types(vec).vectorData
assert rval.valueType == value.VectorValueType.VECTOR_DATA.value
assert rval.extraHeaderInfo == 0
assert rval.vectorElementType == value.VectorElementType.UINT64.value
assert rval.vectorElementType == value._VectorElementType.UINT64.value
assert rval.data == vec.tobytes()

@given(arrays(dtype=(float, np.double), shape=(1, 2)))
def test_value_from_python_types_vector_data_double(self, vec):
rval = value._value_from_python_types(vec).vectorData
assert rval.valueType == value.VectorValueType.VECTOR_DATA.value
assert rval.extraHeaderInfo == 0
assert rval.vectorElementType == value.VectorElementType.DOUBLE.value
assert rval.vectorElementType == value._VectorElementType.DOUBLE.value
assert rval.data == vec.tobytes()

@given(arrays(dtype=(np.single), shape=(1, 2)))
def test_value_from_python_types_vector_data_float(self, vec):
rval = value._value_from_python_types(vec).vectorData
assert rval.valueType == value.VectorValueType.VECTOR_DATA.value
assert rval.extraHeaderInfo == 0
assert rval.vectorElementType == value.VectorElementType.FLOAT.value
assert rval.vectorElementType == value._VectorElementType.FLOAT.value
assert rval.data == vec.tobytes()

@given(arrays(dtype=(np.csingle), shape=(1, 2)))
def test_value_from_python_types_vector_data_complex_float(self, vec):
rval = value._value_from_python_types(vec).vectorData
assert rval.valueType == value.VectorValueType.VECTOR_DATA.value
assert rval.extraHeaderInfo == 0
assert rval.vectorElementType == value.VectorElementType.COMPLEX_FLOAT.value
assert rval.vectorElementType == value._VectorElementType.COMPLEX_FLOAT.value
assert rval.data == vec.tobytes()

@given(arrays(dtype=(np.cdouble), shape=(1, 2)))
def test_value_from_python_types_vector_data_complex_double(self, vec):
rval = value._value_from_python_types(vec).vectorData
assert rval.valueType == value.VectorValueType.VECTOR_DATA.value
assert rval.extraHeaderInfo == 0
assert rval.vectorElementType == value.VectorElementType.COMPLEX_DOUBLE.value
assert rval.vectorElementType == value._VectorElementType.COMPLEX_DOUBLE.value
assert rval.data == vec.tobytes()

0 comments on commit ede875d

Please sign in to comment.