Skip to content

Commit 55bb70f

Browse files
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.
1 parent cf4660d commit 55bb70f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dpctl/tests/test_usm_ndarray_ctor.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2136,6 +2136,8 @@ def test_flags():
21362136
except dpctl.SyclDeviceCreationError:
21372137
pytest.skip("No SYCL devices available")
21382138
f = x.flags
2139+
# check comparison with generic types
2140+
assert f != Ellipsis
21392141
f.__repr__()
21402142
assert f.c_contiguous == f["C"]
21412143
assert f.f_contiguous == f["F"]
@@ -2144,8 +2146,6 @@ def test_flags():
21442146
assert f.forc == f["FORC"]
21452147
assert f.fnc == f["FNC"]
21462148
assert f.writable == f["W"]
2147-
# check comparison with generic types
2148-
f == Ellipsis
21492149

21502150

21512151
def test_asarray_uint64():

0 commit comments

Comments
 (0)