This is an automated email from the ASF dual-hosted git repository.

tomaz pushed a commit to branch dependabot/pip/pytest-8.0.2
in repository https://gitbox.apache.org/repos/asf/libcloud.git

commit 6ba2819ccbadad5fe89984ea2cef8313ba432aae
Author: Tomaz Muraus <to...@tomaz.me>
AuthorDate: Tue Apr 16 19:25:27 2024 +0200

    Try fixing problematic init_once tests.
---
 libcloud/test/test_init.py | 3 ++-
 tox.ini                    | 5 ++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/libcloud/test/test_init.py b/libcloud/test/test_init.py
index d35bf9c31..0bf18ea85 100644
--- a/libcloud/test/test_init.py
+++ b/libcloud/test/test_init.py
@@ -44,9 +44,10 @@ class TestUtils(unittest.TestCase):
         # Reset debug level
         reset_debug()
 
-        # Reset paramiko log level
+        # Reset paramiko log level and handlers
         if have_paramiko:
             paramiko_logger = logging.getLogger("paramiko")
+            paramiko_logger.handlers = []
             paramiko_logger.setLevel(logging.INFO)
 
     @mock.patch.dict(os.environ, {"LIBCLOUD_DEBUG": ""}, clear=True)
diff --git a/tox.ini b/tox.ini
index abe1a57a1..a1dc82195 100644
--- a/tox.ini
+++ b/tox.ini
@@ -327,14 +327,13 @@ deps =
     -r{toxinidir}/integration/storage/requirements.txt
 commands = pytest --color=yes -rsx -vvv --capture=tee-sys -o log_cli=True 
--durations=10 integration/storage
 
-# NOTE: For now, we don't run problematic serial tests with coverage target
 [testenv:coverage]
 deps =
     -r{toxinidir}/requirements-tests.txt
 setenv =
   CRYPTOGRAPHY_ALLOW_OPENSSL_102=1
 commands = cp libcloud/test/secrets.py-dist libcloud/test/secrets.py
-           coverage run --source=libcloud -m pytest --benchmark-disable -m 
"not serial"
+           coverage run --source=libcloud -m pytest --benchmark-disable
 
 [testenv:coverage-ci]
 passenv =
@@ -347,7 +346,7 @@ deps =
 setenv =
   CRYPTOGRAPHY_ALLOW_OPENSSL_102=1
 commands = cp libcloud/test/secrets.py-dist libcloud/test/secrets.py
-           coverage run --source=libcloud -m pytest --benchmark-disable -m 
"not serial"
+           coverage run --source=libcloud -m pytest --benchmark-disable
            coverage xml
 
 [testenv:isort]

Reply via email to