@@ -52,40 +52,40 @@ def test_run_server_with_default_values(
5252 assert result .exit_code == 0
5353 # EXPECT start_server_mock function to be called with the default values:
5454 # 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 )
5656 # port=8000: that is the default port
5757 start_server_mock .assert_called_once_with (Path ("." ), True , 8000 )
5858
5959
6060@mock .patch ("pyscript.plugins.run.start_server" )
61- def test_run_server_with_silent_flag (
61+ def test_run_server_with_no_view_flag (
6262 start_server_mock , invoke_cli : CLIInvoker # noqa: F811
6363):
6464 """
6565 Test that when run is called without arguments the command runs with the
6666 default values
6767 """
6868 # GIVEN a call to run without arguments
69- result = invoke_cli ("run" , "--silent " )
69+ result = invoke_cli ("run" , "--no-view " )
7070 # EXPECT the command to succeed
7171 assert result .exit_code == 0
7272 # EXPECT start_server_mock function to be called with the default values:
7373 # Path("."): path to local folder
74- # show=False: the opposite of the --silent option
74+ # show=False: same as passing the --no-view option
7575 # port=8000: that is the default port
7676 start_server_mock .assert_called_once_with (Path ("." ), False , 8000 )
7777
7878
7979@pytest .mark .parametrize (
8080 "run_args, expected_values" ,
8181 [
82- (("--silent " ,), (Path ("." ), False , 8000 )),
82+ (("--no-view " ,), (Path ("." ), False , 8000 )),
8383 ((BASEPATH ,), (Path (BASEPATH ), True , 8000 )),
8484 (("--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 )),
8787 ((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 )),
8989 ((BASEPATH , "--port=8001" ), (Path (BASEPATH ), True , 8001 )),
9090 ],
9191)
0 commit comments