mirror of https://github.com/borgbackup/borg.git
Merge pull request #7029 from ThomasWaldmann/relative-imports
Relative imports
This commit is contained in:
commit
16787e48b7
|
@ -11,6 +11,6 @@ if sys.platform.startswith("win32"):
|
||||||
os.environ["PATH"] = os.pathsep.join(dll_path) + os.pathsep + os.environ["PATH"]
|
os.environ["PATH"] = os.pathsep.join(dll_path) + os.pathsep + os.environ["PATH"]
|
||||||
|
|
||||||
|
|
||||||
from borg.archiver import main
|
from .archiver import main
|
||||||
|
|
||||||
main()
|
main()
|
||||||
|
|
|
@ -6,10 +6,9 @@ import unittest
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
import borg
|
|
||||||
import borg.helpers.errors
|
|
||||||
from ... import xattr, platform
|
from ... import xattr, platform
|
||||||
from ...constants import * # NOQA
|
from ...constants import * # NOQA
|
||||||
|
from ...locking import Lock
|
||||||
from ...helpers import flags_noatime, flags_normal
|
from ...helpers import flags_noatime, flags_normal
|
||||||
from .. import has_lchflags, llfuse
|
from .. import has_lchflags, llfuse
|
||||||
from .. import changedir, no_selinux
|
from .. import changedir, no_selinux
|
||||||
|
@ -301,7 +300,7 @@ class ArchiverTestCase(ArchiverTestCaseBase):
|
||||||
return wrapper
|
return wrapper
|
||||||
|
|
||||||
# Decorate
|
# Decorate
|
||||||
borg.locking.Lock.migrate_lock = write_assert_data(borg.locking.Lock.migrate_lock)
|
Lock.migrate_lock = write_assert_data(Lock.migrate_lock)
|
||||||
try:
|
try:
|
||||||
self.cmd(f"--repo={self.repository_location}", "rcreate", "--encryption=none")
|
self.cmd(f"--repo={self.repository_location}", "rcreate", "--encryption=none")
|
||||||
self.create_src_archive("arch")
|
self.create_src_archive("arch")
|
||||||
|
@ -347,7 +346,7 @@ class ArchiverTestCase(ArchiverTestCaseBase):
|
||||||
], "new_id must be alive (=must not be stale) when Lock.migrate_lock() has returned."
|
], "new_id must be alive (=must not be stale) when Lock.migrate_lock() has returned."
|
||||||
finally:
|
finally:
|
||||||
# Undecorate
|
# Undecorate
|
||||||
borg.locking.Lock.migrate_lock = borg.locking.Lock.migrate_lock.__wrapped__
|
Lock.migrate_lock = Lock.migrate_lock.__wrapped__
|
||||||
|
|
||||||
|
|
||||||
class RemoteArchiverTestCase(RemoteArchiverTestCaseBase, ArchiverTestCase):
|
class RemoteArchiverTestCase(RemoteArchiverTestCaseBase, ArchiverTestCase):
|
||||||
|
|
Loading…
Reference in New Issue