diff --git a/test/test_wrapper.py b/test/test_wrapper.py
index f7fa55eeaad67e0a9da6cf98281a5b6d17f4564d..ea50bd5a9a7f9f5e89b62f9d276d1cdd92f48c6b 100644
--- a/test/test_wrapper.py
+++ b/test/test_wrapper.py
@@ -552,7 +552,7 @@ def test_mempool(ctx_factory):
 
 
 def test_mempool_2(ctx_factory):
-    from pyopencl.tools import MemoryPool
+    from pyopencl.tools import MemoryPool, ImmediateAllocator
     from random import randrange
 
     context = ctx_factory()