Skip to content

Commit

Permalink
Exercise default_sycl_platform on Linux only
Browse files Browse the repository at this point in the history
It is not yet supported on Windows.
  • Loading branch information
oleksandr-pavlyk committed Aug 10, 2023
1 parent b40d357 commit e54aaa0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dpctl/tests/test_sycl_platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
"""Defines unit test cases for the SyclPlatform class.
"""

import sys

import pytest
from helper import has_sycl_platforms

Expand Down Expand Up @@ -88,12 +90,16 @@ def check_repr(platform):


def check_default_context(platform):
if "linux" not in sys.platform:
return
r = platform.default_context
assert type(r) is dpctl.SyclContext


def check_equal_and_hash(platform):
assert platform == platform
if "linux" not in sys.platform:
return
default_ctx = platform.default_context
for d in default_ctx.get_devices():
assert platform == d.sycl_platform
Expand Down

0 comments on commit e54aaa0

Please sign in to comment.