From 55bb70f5c124fde10a0f627a3819fcfee89aaa35 Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Sun, 27 Aug 2023 07:31:41 -0500 Subject: [PATCH] Turn comparison call into assertion Moved the assertion about comparison with generic types before other assertions. This change is made in reference to Coverity scan issue. --- dpctl/tests/test_usm_ndarray_ctor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dpctl/tests/test_usm_ndarray_ctor.py b/dpctl/tests/test_usm_ndarray_ctor.py index 82b4303460..72f5aabebb 100644 --- a/dpctl/tests/test_usm_ndarray_ctor.py +++ b/dpctl/tests/test_usm_ndarray_ctor.py @@ -2136,6 +2136,8 @@ def test_flags(): except dpctl.SyclDeviceCreationError: pytest.skip("No SYCL devices available") f = x.flags + # check comparison with generic types + assert f != Ellipsis f.__repr__() assert f.c_contiguous == f["C"] assert f.f_contiguous == f["F"] @@ -2144,8 +2146,6 @@ def test_flags(): assert f.forc == f["FORC"] assert f.fnc == f["FNC"] assert f.writable == f["W"] - # check comparison with generic types - f == Ellipsis def test_asarray_uint64():