From 0d1470c04cb3f346bc9a71ef5a0f64f7927677e9 Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Thu, 4 Aug 2016 14:24:38 -0500
Subject: [PATCH] Fix version-based skip conditions in tests

---
 test/test_wrapper.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/test_wrapper.py b/test/test_wrapper.py
index 505f56ad..903da758 100644
--- a/test/test_wrapper.py
+++ b/test/test_wrapper.py
@@ -881,7 +881,7 @@ def test_global_offset(ctx_factory):
 
 def test_sub_buffers(ctx_factory):
     ctx = ctx_factory()
-    if (ctx._get_cl_version() < (1, 1) and
+    if (ctx._get_cl_version() < (1, 1) or
             cl.get_cl_header_version() < (1, 1)):
         from pytest import skip
         skip("sub-buffers are only available in OpenCL 1.1")
@@ -911,7 +911,7 @@ def test_spirv(ctx_factory):
     ctx = ctx_factory()
     queue = cl.CommandQueue(ctx)
 
-    if (ctx._get_cl_version() < (2, 1) and
+    if (ctx._get_cl_version() < (2, 1) or
             cl.get_cl_header_version() < (2, 1)):
         from pytest import skip
         skip("SPIR-V program creation only available in OpenCL 2.1")
-- 
GitLab