Compare commits

..
2 Commits
6 changed files with 25 additions and 20 deletions
+1
View File
@@ -28,3 +28,4 @@ e58246fc92bb22c2b2fd8b86a1227de69d2d0315 0.1.4
dbc96d3f83bd5570b6826537616d4160b3374836 0.1.8
0e1fbee9358de4f062fa9539e1355db83db70caa 1.0.0
de2d7721cdec93a52d20222a9ddd579ed93c1017 1.0.1
9603d13910b32d57a887765cab694ac5d0acc1f4 1.0.2
+4
View File
@@ -1,3 +1,7 @@
1.0.3
* #21: Fix for verbosity flag not actually causing verbose output.
1.0.2
* #20: Fix for traceback when remote_path option is missing.
+6 -6
View File
@@ -41,8 +41,8 @@ def create_archive(
one_file_system_flags = ('--one-file-system',) if one_file_system else ()
remote_path_flags = ('--remote-path', remote_path) if remote_path else ()
verbosity_flags = {
VERBOSITY_SOME: ('--stats',),
VERBOSITY_LOTS: ('--verbose', '--stats'),
VERBOSITY_SOME: ('--info', '--stats',),
VERBOSITY_LOTS: ('--debug', '--list', '--stats'),
}.get(verbosity, ())
full_command = (
@@ -88,8 +88,8 @@ def prune_archives(verbosity, repository, retention_config, command=COMMAND, rem
'''
remote_path_flags = ('--remote-path', remote_path) if remote_path else ()
verbosity_flags = {
VERBOSITY_SOME: ('--stats',),
VERBOSITY_LOTS: ('--verbose', '--stats'),
VERBOSITY_SOME: ('--info', '--stats',),
VERBOSITY_LOTS: ('--debug', '--stats'),
}.get(verbosity, ())
full_command = (
@@ -171,8 +171,8 @@ def check_archives(verbosity, repository, consistency_config, command=COMMAND, r
remote_path_flags = ('--remote-path', remote_path) if remote_path else ()
verbosity_flags = {
VERBOSITY_SOME: ('--verbose',),
VERBOSITY_LOTS: ('--verbose',),
VERBOSITY_SOME: ('--info',),
VERBOSITY_LOTS: ('--debug',),
}.get(verbosity, ())
full_command = (
+12 -12
View File
@@ -102,8 +102,8 @@ def test_create_archive_with_none_excludes_filename_should_call_borg_without_exc
)
def test_create_archive_with_verbosity_some_should_call_borg_with_stats_parameter():
insert_subprocess_mock(CREATE_COMMAND + ('--stats',))
def test_create_archive_with_verbosity_some_should_call_borg_with_info_parameter():
insert_subprocess_mock(CREATE_COMMAND + ('--info', '--stats',))
insert_platform_mock()
insert_datetime_mock()
@@ -117,8 +117,8 @@ def test_create_archive_with_verbosity_some_should_call_borg_with_stats_paramete
)
def test_create_archive_with_verbosity_lots_should_call_borg_with_verbose_parameter():
insert_subprocess_mock(CREATE_COMMAND + ('--verbose', '--stats'))
def test_create_archive_with_verbosity_lots_should_call_borg_with_debug_parameter():
insert_subprocess_mock(CREATE_COMMAND + ('--debug', '--list', '--stats'))
insert_platform_mock()
insert_datetime_mock()
@@ -283,12 +283,12 @@ def test_prune_archives_should_call_borg_with_parameters():
)
def test_prune_archives_with_verbosity_some_should_call_borg_with_stats_parameter():
def test_prune_archives_with_verbosity_some_should_call_borg_with_info_parameter():
retention_config = flexmock()
flexmock(module).should_receive('_make_prune_flags').with_args(retention_config).and_return(
BASE_PRUNE_FLAGS,
)
insert_subprocess_mock(PRUNE_COMMAND + ('--stats',))
insert_subprocess_mock(PRUNE_COMMAND + ('--info', '--stats',))
module.prune_archives(
repository='repo',
@@ -298,12 +298,12 @@ def test_prune_archives_with_verbosity_some_should_call_borg_with_stats_paramete
)
def test_prune_archives_with_verbosity_lots_should_call_borg_with_verbose_parameter():
def test_prune_archives_with_verbosity_lots_should_call_borg_with_debug_parameter():
retention_config = flexmock()
flexmock(module).should_receive('_make_prune_flags').with_args(retention_config).and_return(
BASE_PRUNE_FLAGS,
)
insert_subprocess_mock(PRUNE_COMMAND + ('--verbose', '--stats',))
insert_subprocess_mock(PRUNE_COMMAND + ('--debug', '--stats',))
module.prune_archives(
repository='repo',
@@ -400,12 +400,12 @@ def test_check_archives_should_call_borg_with_parameters():
)
def test_check_archives_with_verbosity_some_should_call_borg_with_verbose_parameter():
def test_check_archives_with_verbosity_some_should_call_borg_with_info_parameter():
consistency_config = flexmock().should_receive('get').and_return(None).mock
flexmock(module).should_receive('_parse_checks').and_return(flexmock())
flexmock(module).should_receive('_make_check_flags').and_return(())
insert_subprocess_mock(
('borg', 'check', 'repo', '--verbose'),
('borg', 'check', 'repo', '--info'),
stdout=None, stderr=STDOUT,
)
insert_platform_mock()
@@ -419,12 +419,12 @@ def test_check_archives_with_verbosity_some_should_call_borg_with_verbose_parame
)
def test_check_archives_with_verbosity_lots_should_call_borg_with_verbose_parameter():
def test_check_archives_with_verbosity_lots_should_call_borg_with_debug_parameter():
consistency_config = flexmock().should_receive('get').and_return(None).mock
flexmock(module).should_receive('_parse_checks').and_return(flexmock())
flexmock(module).should_receive('_make_check_flags').and_return(())
insert_subprocess_mock(
('borg', 'check', 'repo', '--verbose'),
('borg', 'check', 'repo', '--debug'),
stdout=None, stderr=STDOUT,
)
insert_platform_mock()
+1 -1
View File
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages
VERSION = '1.0.2'
VERSION = '1.0.3'
setup(
+1 -1
View File
@@ -5,4 +5,4 @@ skipsdist=True
[testenv]
usedevelop=True
deps=-rtest_requirements.txt
commands = py.test []
commands = py.test borgmatic []