Skip to content

Commit

Permalink
More concessions for Python 3.5 compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
witten committed Oct 15, 2018
1 parent c1ddc42 commit fef441a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/end-to-end/test_borgmatic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -42,19 +44,17 @@ 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
assert len(parsed_output[0]['archives']) == 1

# 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
Expand Down

0 comments on commit fef441a

Please sign in to comment.