mirror of
https://github.com/borgbackup/borg.git
synced 2025-01-22 23:38:57 +00:00
fix pep8 violations in conftest.py
This commit is contained in:
parent
d0841eb759
commit
96a138b226
2 changed files with 7 additions and 8 deletions
14
conftest.py
14
conftest.py
|
@ -15,16 +15,15 @@
|
|||
pytest.register_assert_rewrite('borg.testsuite')
|
||||
|
||||
|
||||
import borg.cache
|
||||
from borg.logger import setup_logging
|
||||
import borg.cache # noqa: E402
|
||||
from borg.logger import setup_logging # noqa: E402
|
||||
|
||||
# Ensure that the loggers exist for all tests
|
||||
setup_logging()
|
||||
|
||||
from borg.testsuite import has_lchflags, has_llfuse, has_pyfuse3
|
||||
from borg.testsuite import are_symlinks_supported, are_hardlinks_supported, is_utime_fully_supported
|
||||
from borg.testsuite.platform import fakeroot_detected, are_acls_working
|
||||
from borg import xattr
|
||||
from borg.testsuite import has_lchflags, has_llfuse, has_pyfuse3 # noqa: E402
|
||||
from borg.testsuite import are_symlinks_supported, are_hardlinks_supported, is_utime_fully_supported # noqa: E402
|
||||
from borg.testsuite.platform import fakeroot_detected # noqa: E402
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
|
@ -67,7 +66,8 @@ def __init__(self, request):
|
|||
self.org_cache_wipe_cache = borg.cache.LocalCache.wipe_cache
|
||||
|
||||
def wipe_should_not_be_called(*a, **kw):
|
||||
raise AssertionError("Cache wipe was triggered, if this is part of the test add @pytest.mark.allow_cache_wipe")
|
||||
raise AssertionError("Cache wipe was triggered, if this is part of the test add "
|
||||
"@pytest.mark.allow_cache_wipe")
|
||||
if 'allow_cache_wipe' not in request.keywords:
|
||||
borg.cache.LocalCache.wipe_cache = wipe_should_not_be_called
|
||||
request.addfinalizer(self.undo)
|
||||
|
|
|
@ -42,7 +42,6 @@ ignore = E226, W503
|
|||
# with existing code. if you want to change them, you should first fix all
|
||||
# flake8 failures that appear with your change.
|
||||
per_file_ignores =
|
||||
conftest.py:E402,E501,F401
|
||||
docs/conf.py:E121,E126,E265,E305,E401,E402
|
||||
scripts/errorlist.py:F401
|
||||
src/borg/archive.py:E122,E125,E127,E402,E501,F401,F405,W504
|
||||
|
|
Loading…
Reference in a new issue