def test_default_platform_creation(check): platform = None try: platform = dpctl.SyclPlatform() except ValueError: pytest.skip("Failed to create default platform") check(platform)
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)
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)