File tree 3 files changed +16
-4
lines changed
3 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,8 @@ Further examples and use cases are found in the [accompanying Jupyter Notebook](
48
48
options:
49
49
-h, --help Show this help message and exit
50
50
-v, --version Show program's version number and exit
51
- --no-confirm Bypass any confirmation prompts
51
+ --no-confirm, --skip-prompt
52
+ Bypass any confirmation prompts
52
53
-n, --no-resize Do not resize images to the specified width and height, but instead use the original image's pixels.
53
54
-i, --input INPUT
54
55
Folder where images to crop are located. Default: current working directory
Original file line number Diff line number Diff line change @@ -245,7 +245,11 @@ def parse_args(args):
245
245
action = "version" ,
246
246
version = "%(prog)s version {}" .format (__version__ ),
247
247
)
248
- parser .add_argument ("--no-confirm" , action = "store_true" , help = help_d ["y" ])
248
+ parser .add_argument (
249
+ "--no-confirm" ,
250
+ "--skip-prompt" ,
251
+ action = "store_true" , help = help_d ["y" ]
252
+ )
249
253
parser .add_argument (
250
254
"-n" ,
251
255
"--no-resize" ,
Original file line number Diff line number Diff line change @@ -192,9 +192,16 @@ def test_user_does_not_get_prompted_if_output_d_is_given(mock_confirm):
192
192
193
193
@mock .patch ("autocrop.cli.main" , lambda * args : None )
194
194
@mock .patch ("autocrop.cli.confirmation" )
195
- def test_user_does_not_get_prompted_if_no_confirm (mock_confirm ):
195
+ @pytest .mark .parametrize (
196
+ "flag" ,
197
+ [
198
+ ("--no-confirm" ),
199
+ ("--skip-prompt" ),
200
+ ],
201
+ )
202
+ def test_user_does_not_get_prompted_if_no_confirm (mock_confirm , flag ):
196
203
mock_confirm .return_value = False
197
- sys .argv = ["" , "-i" , "tests/data" , "--no-confirm" ]
204
+ sys .argv = ["" , "-i" , "tests/data" , flag ]
198
205
assert mock_confirm .call_count == 0
199
206
command_line_interface ()
200
207
assert mock_confirm .call_count == 0
You can’t perform that action at this time.
0 commit comments