diff --git a/test/test_wrapper.py b/test/test_wrapper.py
index 3a1cf243841234a83c5b4b2b188c0bd7b2dd1393..aef813a965699dca473744d4fd5d50544718107a 100644
--- a/test/test_wrapper.py
+++ b/test/test_wrapper.py
@@ -595,7 +595,6 @@ def test_context_dep_memoize(ctx_factory):
 def test_can_build_binary(ctx_factory):
     ctx = ctx_factory()
     device, = ctx.devices
-    platform = device.platform
 
     program = cl.Program(ctx, """
     __kernel void simple(__global float *in, __global float *out)