From 7e81ff03f8d541c2bb699a43659433c161affb81 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <henrik@trineo.org>
Date: Thu, 4 Nov 2021 15:46:23 +0100
Subject: [PATCH] MAINT: skip benchmark test if server variable is disabled

---
 tests/test_misc.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tests/test_misc.py b/tests/test_misc.py
index 559bd99..644982d 100644
--- a/tests/test_misc.py
+++ b/tests/test_misc.py
@@ -224,9 +224,14 @@ def test_annotation():
     assert rec.id == ann.id
 
 
+@mark.skipif(
+    admin.get_server_property("TRANSACTION_BENCHMARK_ENABLED") != "TRUE")
 def test_info():
     assert admin.get_server_property(
-        "TRANSACTION_BENCHMARK_ENABLED") == "TRUE", "Please activate the transaction benchmark with the server option TRANSACTION_BENCHMARK_ENABLED=TRUE (Restart of the server needed)"
+        "TRANSACTION_BENCHMARK_ENABLED") == "TRUE",\
+        "Please activate the transaction benchmark with the server option "\
+        "TRANSACTION_BENCHMARK_ENABLED=TRUE (Restart of the server needed)"
+
     i = Info()
     assert (i.messages["Flags"]) is not None
     assert (i.messages["Counts"]) is not None
-- 
GitLab