diff --git a/borgmatic/hooks/data_source/snapshot.py b/borgmatic/hooks/data_source/snapshot.py index 7b5e4503..58af9e37 100644 --- a/borgmatic/hooks/data_source/snapshot.py +++ b/borgmatic/hooks/data_source/snapshot.py @@ -1,4 +1,3 @@ -import itertools import pathlib IS_A_HOOK = False diff --git a/tests/end-to-end/commands/fake_findmnt.py b/tests/end-to-end/commands/fake_findmnt.py index ddc6c787..d7393bb3 100644 --- a/tests/end-to-end/commands/fake_findmnt.py +++ b/tests/end-to-end/commands/fake_findmnt.py @@ -1,5 +1,4 @@ import argparse -import json import sys diff --git a/tests/end-to-end/test_btrfs.py b/tests/end-to-end/test_btrfs.py index 2c410774..2df6228b 100644 --- a/tests/end-to-end/test_btrfs.py +++ b/tests/end-to-end/test_btrfs.py @@ -55,7 +55,7 @@ def test_btrfs_create_and_list(): # Assert that the snapshot has been deleted. assert not subprocess.check_output( - f'python3 /app/tests/end-to-end/commands/fake_btrfs.py subvolume list -s /mnt/subvolume'.split( + 'python3 /app/tests/end-to-end/commands/fake_btrfs.py subvolume list -s /mnt/subvolume'.split( ' ' ) ) diff --git a/tests/end-to-end/test_zfs.py b/tests/end-to-end/test_zfs.py index 7c2cd7f6..9a338ebb 100644 --- a/tests/end-to-end/test_zfs.py +++ b/tests/end-to-end/test_zfs.py @@ -56,7 +56,7 @@ def test_zfs_create_and_list(): # Assert that the snapshot has been deleted. assert not subprocess.check_output( - f'python3 /app/tests/end-to-end/commands/fake_zfs.py list -H -t snapshot'.split(' ') + 'python3 /app/tests/end-to-end/commands/fake_zfs.py list -H -t snapshot'.split(' ') ) finally: shutil.rmtree(temporary_directory) diff --git a/tests/unit/hooks/data_source/test_lvm.py b/tests/unit/hooks/data_source/test_lvm.py index 250fa535..d5fe1ed2 100644 --- a/tests/unit/hooks/data_source/test_lvm.py +++ b/tests/unit/hooks/data_source/test_lvm.py @@ -67,7 +67,6 @@ def test_get_logical_volumes_with_invalid_lsblk_json_errors(): 'execute_command_and_capture_output' ).and_return('{') - contained = {'/mnt/lvolume', '/mnt/lvolume/subdir'} flexmock(module.borgmatic.hooks.data_source.snapshot).should_receive( 'get_contained_directories' ).never() @@ -83,7 +82,6 @@ def test_get_logical_volumes_with_lsblk_json_missing_keys_errors(): 'execute_command_and_capture_output' ).and_return('{"block_devices": [{}]}') - contained = {'/mnt/lvolume', '/mnt/lvolume/subdir'} flexmock(module.borgmatic.hooks.data_source.snapshot).should_receive( 'get_contained_directories' ).never()