From bcdbaa16c54e183b386bf3469d6538f0f5a9310f Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Sep 02 2024 09:26:44 +0000 Subject: Silence test warnings Related: https://pagure.io/koji/issue/4188 --- diff --git a/tests/test_lib/test_utils.py b/tests/test_lib/test_utils.py index 79aa414..d54db70 100644 --- a/tests/test_lib/test_utils.py +++ b/tests/test_lib/test_utils.py @@ -1844,7 +1844,10 @@ class TestRmtree2(unittest.TestCase): sync = threading.Event() def do_rmtree(dirname): sync.wait() - koji.util.rmtree(dirname) + with self.assertWarns(DeprecationWarning): + # DeprecationWarning: This process is multi-threaded, + # use of fork() may lead to deadlocks in the child. + koji.util.rmtree(dirname) threads = [] for d in dirs: @@ -1870,7 +1873,10 @@ class TestRmtree2(unittest.TestCase): sync = threading.Event() def do_rmtree(dirname): sync.wait() - koji.util.rmtree(dirname) + with self.assertWarns(DeprecationWarning): + # DeprecationWarning: This process is multi-threaded, + # use of fork() may lead to deadlocks in the child. + koji.util.rmtree(dirname) threads = [] for n in range(3):