소스 검색

work around spurious log level related test fail when using pytest-xdist

Thomas Waldmann 8 년 전
부모
커밋
2938a5f6fb
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      borg/testsuite/repository.py

+ 3 - 0
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'