From 3efe637c81f70aadeca2d4c6af877b9ab06f0996 Mon Sep 17 00:00:00 2001
From: Xavier Robin <xavier.robin@unibas.ch>
Date: Tue, 23 Jul 2024 11:35:14 +0200
Subject: [PATCH] test: hide warnings

---
 modules/conop/src/chemdict_tool.cc  | 3 +++
 modules/conop/tests/test_complib.py | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/conop/src/chemdict_tool.cc b/modules/conop/src/chemdict_tool.cc
index 94668818b..97d9c45f2 100644
--- a/modules/conop/src/chemdict_tool.cc
+++ b/modules/conop/src/chemdict_tool.cc
@@ -45,6 +45,7 @@ void PrintUsage()
   std::cout << "  -i  - ignore compounds reserved by the PDB (01-99, DRG, INH, LIG)" << std::endl;
   std::cout << "  -o  - ignore obsolete compounds" << std::endl;
   std::cout << "  -v  - be more verbose" << std::endl;
+  std::cout << "  -q  - be more quiet (last of -v or -q is applied)" << std::endl;
 }
 
 int main(int argc, char const *argv[])
@@ -74,6 +75,8 @@ int main(int argc, char const *argv[])
       ignore_obsolete=true;
     } else if (param=="-v") {
       Logger::Instance().PushVerbosityLevel(4);
+    } else if (param=="-q") {
+      Logger::Instance().PushVerbosityLevel(0);
     } else {
       PrintUsage();
       return 0;
diff --git a/modules/conop/tests/test_complib.py b/modules/conop/tests/test_complib.py
index 326db68f1..5ffcb5af4 100644
--- a/modules/conop/tests/test_complib.py
+++ b/modules/conop/tests/test_complib.py
@@ -11,7 +11,7 @@ def CreateComplib(compound_dict_path, chemlib_out_path, extra_args=None):
     chemdict_tool_path = os.path.join(prefix_path, "bin", "chemdict_tool")
     if not os.path.exists(chemdict_tool_path):
         raise RuntimeError("Expect chemdict_tool:", chemdict_tool_path)
-    cmd = [chemdict_tool_path, "create", compound_dict_path, chemlib_out_path]
+    cmd = [chemdict_tool_path, "create", compound_dict_path, chemlib_out_path, "-q"]
     if extra_args:
         cmd += extra_args
     subprocess.run(cmd, stdout=subprocess.PIPE)
-- 
GitLab