示例#1
0
def test_default_platform_creation(check):
    platform = None
    try:
        platform = dpctl.SyclPlatform()
    except ValueError:
        pytest.skip("Failed to create default platform")
    check(platform)
示例#2
0
def test_platform_creation(valid_filter, check):
    """Tests if we can create a SyclPlatform using a supported filter selector
    string.
    """
    platform = None
    try:
        platform = dpctl.SyclPlatform(valid_filter)
    except ValueError:
        pytest.skip("Failed to create platform with supported filter")
    check(platform)
示例#3
0
def test_invalid_platform_creation(invalid_filter, check):
    """Tests if we can create a SyclPlatform using a supported filter selector
    string.
    """
    with pytest.raises(ValueError):
        dpctl.SyclPlatform(invalid_filter)