diff --git a/tests/pytests/meson.build b/tests/pytests/meson.build
index faef8f5e9fd52c4288fd94097d4974d979710199..185f713d5daef744b11de921289d94a6306d774f 100644
--- a/tests/pytests/meson.build
+++ b/tests/pytests/meson.build
@@ -9,6 +9,10 @@ py3_deps += [
   ['xdist', 'pytest-xdist (for pytests)'],
 ]
 
+if gnutls.version().version_compare('<3.6.4')
+  error('pytests require GnuTLS >= 3.6.4')
+endif
+
 # compile tlsproxy
 tlsproxy_src = files([
   'proxy/tlsproxy.c',