From 2938a5f6fbb437adced4b88357d30e7ee9f5d29b Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Thu, 5 Jan 2017 03:59:33 +0100 Subject: [PATCH] work around spurious log level related test fail when using pytest-xdist --- borg/testsuite/repository.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/borg/testsuite/repository.py b/borg/testsuite/repository.py index e217137af..713b03cfd 100644 --- a/borg/testsuite/repository.py +++ b/borg/testsuite/repository.py @@ -1,3 +1,4 @@ +import logging import os import shutil import sys @@ -440,6 +441,8 @@ class RemoteRepositoryTestCase(RepositoryTestCase): assert self.repository.borg_cmd(None, testing=True) == [sys.executable, '-m', 'borg.archiver', 'serve'] args = MockArgs() + # XXX without next line we get spurious test fails when using pytest-xdist, root cause unknown: + logging.getLogger().setLevel(logging.INFO) # note: test logger is on info log level, so --info gets added automagically assert self.repository.borg_cmd(args, testing=False) == ['borg', 'serve', '--umask=077', '--info'] args.remote_path = 'borg-0.28.2'