@@ -52,40 +52,40 @@ def test_run_server_with_default_values(
52
52
assert result .exit_code == 0
53
53
# EXPECT start_server_mock function to be called with the default values:
54
54
# Path("."): path to local folder
55
- # show=True: the opposite of the --silent option (which default to False )
55
+ # show=True: same as passing the --view option (which defaults to True )
56
56
# port=8000: that is the default port
57
57
start_server_mock .assert_called_once_with (Path ("." ), True , 8000 )
58
58
59
59
60
60
@mock .patch ("pyscript.plugins.run.start_server" )
61
- def test_run_server_with_silent_flag (
61
+ def test_run_server_with_no_view_flag (
62
62
start_server_mock , invoke_cli : CLIInvoker # noqa: F811
63
63
):
64
64
"""
65
65
Test that when run is called without arguments the command runs with the
66
66
default values
67
67
"""
68
68
# GIVEN a call to run without arguments
69
- result = invoke_cli ("run" , "--silent " )
69
+ result = invoke_cli ("run" , "--no-view " )
70
70
# EXPECT the command to succeed
71
71
assert result .exit_code == 0
72
72
# EXPECT start_server_mock function to be called with the default values:
73
73
# Path("."): path to local folder
74
- # show=False: the opposite of the --silent option
74
+ # show=False: same as passing the --no-view option
75
75
# port=8000: that is the default port
76
76
start_server_mock .assert_called_once_with (Path ("." ), False , 8000 )
77
77
78
78
79
79
@pytest .mark .parametrize (
80
80
"run_args, expected_values" ,
81
81
[
82
- (("--silent " ,), (Path ("." ), False , 8000 )),
82
+ (("--no-view " ,), (Path ("." ), False , 8000 )),
83
83
((BASEPATH ,), (Path (BASEPATH ), True , 8000 )),
84
84
(("--port=8001" ,), (Path ("." ), True , 8001 )),
85
- (("--silent " , "--port=8001" ), (Path ("." ), False , 8001 )),
86
- ((BASEPATH , "--silent " ), (Path (BASEPATH ), False , 8000 )),
85
+ (("--no-view " , "--port=8001" ), (Path ("." ), False , 8001 )),
86
+ ((BASEPATH , "--no-view " ), (Path (BASEPATH ), False , 8000 )),
87
87
((BASEPATH , "--port=8001" ), (Path (BASEPATH ), True , 8001 )),
88
- ((BASEPATH , "--silent " , "--port=8001" ), (Path (BASEPATH ), False , 8001 )),
88
+ ((BASEPATH , "--no-view " , "--port=8001" ), (Path (BASEPATH ), False , 8001 )),
89
89
((BASEPATH , "--port=8001" ), (Path (BASEPATH ), True , 8001 )),
90
90
],
91
91
)
0 commit comments