conftest.py 807 B

1234567891011121314151617181920212223
  1. from borg.logger import setup_logging
  2. # Ensure that the loggers exist for all tests
  3. setup_logging()
  4. from borg.testsuite import has_lchflags, no_lchlfags_because, has_llfuse
  5. from borg.testsuite.platform import fakeroot_detected
  6. from borg import xattr, constants
  7. def pytest_configure(config):
  8. # no fixture-based monkey-patching since star-imports are used for the constants module
  9. constants.PBKDF2_ITERATIONS = 1
  10. def pytest_report_header(config, startdir):
  11. yesno = ['no', 'yes']
  12. flags = 'Testing BSD-style flags: %s %s' % (yesno[has_lchflags], no_lchlfags_because)
  13. fakeroot = 'fakeroot: %s (>=1.20.2: %s)' % (
  14. yesno[fakeroot_detected()],
  15. yesno[xattr.XATTR_FAKEROOT])
  16. llfuse = 'Testing fuse: %s' % yesno[has_llfuse]
  17. return '\n'.join((flags, llfuse, fakeroot))