More concessions for Python 3.5 compatibility.
This commit is contained in:
parent
c1ddc4268b
commit
fef441a8ff
1 changed files with 7 additions and 7 deletions
|
@ -11,7 +11,9 @@ def generate_configuration(config_path, repository_path):
|
|||
Generate borgmatic configuration into a file at the config path, and update the defaults so as
|
||||
to work for testing (including injecting the given repository path).
|
||||
'''
|
||||
subprocess.check_call('generate-borgmatic-config --destination {}'.format(config_path).split(' '))
|
||||
subprocess.check_call(
|
||||
'generate-borgmatic-config --destination {}'.format(config_path).split(' ')
|
||||
)
|
||||
config = (
|
||||
open(config_path)
|
||||
.read()
|
||||
|
@ -42,9 +44,8 @@ def test_borgmatic_command():
|
|||
# Run borgmatic to generate a backup archive, and then list it to make sure it exists.
|
||||
subprocess.check_call('borgmatic --config {}'.format(config_path).split(' '))
|
||||
output = subprocess.check_output(
|
||||
'borgmatic --config {} --list --json'.format(config_path).split(' '),
|
||||
encoding=sys.stdout.encoding,
|
||||
)
|
||||
'borgmatic --config {} --list --json'.format(config_path).split(' ')
|
||||
).decode(sys.stdout.encoding)
|
||||
parsed_output = json.loads(output)
|
||||
|
||||
assert len(parsed_output) == 1
|
||||
|
@ -52,9 +53,8 @@ def test_borgmatic_command():
|
|||
|
||||
# Also exercise the info flag.
|
||||
output = subprocess.check_output(
|
||||
'borgmatic --config {} --info --json'.format(config_path).split(' '),
|
||||
encoding=sys.stdout.encoding,
|
||||
)
|
||||
'borgmatic --config {} --info --json'.format(config_path).split(' ')
|
||||
).decode(sys.stdout.encoding)
|
||||
parsed_output = json.loads(output)
|
||||
|
||||
assert len(parsed_output) == 1
|
||||
|
|
Loading…
Reference in a new issue