@@ -89,24 +89,80 @@ def test_run_server_with_no_view_flag(
89
89
(("--no-view" ,), (Path ("." ), False , 8000 ), {"default_file" : None }),
90
90
((BASEPATH ,), (Path (BASEPATH ), True , 8000 ), {"default_file" : None }),
91
91
(("--port=8001" ,), (Path ("." ), True , 8001 ), {"default_file" : None }),
92
- (("--no-view" , "--port=8001" ), (Path ("." ), False , 8001 ), {"default_file" : None }),
93
- ((BASEPATH , "--no-view" ), (Path (BASEPATH ), False , 8000 ), {"default_file" : None }),
94
- ((BASEPATH , "--port=8001" ), (Path (BASEPATH ), True , 8001 ), {"default_file" : None }),
95
- ((BASEPATH , "--no-view" , "--port=8001" ), (Path (BASEPATH ), False , 8001 ), {"default_file" : None }),
96
- ((BASEPATH , "--port=8001" ), (Path (BASEPATH ), True , 8001 ), {"default_file" : None }),
97
- (("--no-view" , "--default-file=index.html" ), (Path ("." ), False , 8000 ), {"default_file" : Path ("index.html" )}),
98
- ((BASEPATH , "--default-file=index.html" ), (Path (BASEPATH ), True , 8000 ), {"default_file" : Path ("index.html" )}),
99
- (("--port=8001" , "--default-file=index.html" ), (Path ("." ), True , 8001 ), {"default_file" : Path ("index.html" )}),
100
- (("--no-view" , "--port=8001" , "--default-file=index.html" ), (Path ("." ), False , 8001 ), {"default_file" : Path ("index.html" )}),
101
- ((BASEPATH , "--no-view" , "--default-file=index.html" ), (Path (BASEPATH ), False , 8000 ), {"default_file" : Path ("index.html" )}),
102
- ((BASEPATH , "--port=8001" , "--default-file=index.html" ), (Path (BASEPATH ), True , 8001 ), {"default_file" : Path ("index.html" )}),
103
- ((BASEPATH , "--no-view" , "--port=8001" , "--default-file=index.html" ), (Path (BASEPATH ), False , 8001 ), {"default_file" : Path ("index.html" )}),
104
- ((BASEPATH , "--port=8001" , "--default-file=index.html" ), (Path (BASEPATH ), True , 8001 ), {"default_file" : Path ("index.html" )}),
92
+ (
93
+ ("--no-view" , "--port=8001" ),
94
+ (Path ("." ), False , 8001 ),
95
+ {"default_file" : None },
96
+ ),
97
+ (
98
+ (BASEPATH , "--no-view" ),
99
+ (Path (BASEPATH ), False , 8000 ),
100
+ {"default_file" : None },
101
+ ),
102
+ (
103
+ (BASEPATH , "--port=8001" ),
104
+ (Path (BASEPATH ), True , 8001 ),
105
+ {"default_file" : None },
106
+ ),
107
+ (
108
+ (BASEPATH , "--no-view" , "--port=8001" ),
109
+ (Path (BASEPATH ), False , 8001 ),
110
+ {"default_file" : None },
111
+ ),
112
+ (
113
+ (BASEPATH , "--port=8001" ),
114
+ (Path (BASEPATH ), True , 8001 ),
115
+ {"default_file" : None },
116
+ ),
117
+ (
118
+ ("--no-view" , "--default-file=index.html" ),
119
+ (Path ("." ), False , 8000 ),
120
+ {"default_file" : Path ("index.html" )},
121
+ ),
122
+ (
123
+ (BASEPATH , "--default-file=index.html" ),
124
+ (Path (BASEPATH ), True , 8000 ),
125
+ {"default_file" : Path ("index.html" )},
126
+ ),
127
+ (
128
+ ("--port=8001" , "--default-file=index.html" ),
129
+ (Path ("." ), True , 8001 ),
130
+ {"default_file" : Path ("index.html" )},
131
+ ),
132
+ (
133
+ ("--no-view" , "--port=8001" , "--default-file=index.html" ),
134
+ (Path ("." ), False , 8001 ),
135
+ {"default_file" : Path ("index.html" )},
136
+ ),
137
+ (
138
+ (BASEPATH , "--no-view" , "--default-file=index.html" ),
139
+ (Path (BASEPATH ), False , 8000 ),
140
+ {"default_file" : Path ("index.html" )},
141
+ ),
142
+ (
143
+ (BASEPATH , "--port=8001" , "--default-file=index.html" ),
144
+ (Path (BASEPATH ), True , 8001 ),
145
+ {"default_file" : Path ("index.html" )},
146
+ ),
147
+ (
148
+ (BASEPATH , "--no-view" , "--port=8001" , "--default-file=index.html" ),
149
+ (Path (BASEPATH ), False , 8001 ),
150
+ {"default_file" : Path ("index.html" )},
151
+ ),
152
+ (
153
+ (BASEPATH , "--port=8001" , "--default-file=index.html" ),
154
+ (Path (BASEPATH ), True , 8001 ),
155
+ {"default_file" : Path ("index.html" )},
156
+ ),
105
157
],
106
158
)
107
159
@mock .patch ("pyscript.plugins.run.start_server" )
108
160
def test_run_server_with_valid_combinations (
109
- start_server_mock , invoke_cli : CLIInvoker , run_args , expected_posargs , expected_kwargs # noqa: F811
161
+ start_server_mock ,
162
+ invoke_cli : CLIInvoker ,
163
+ run_args ,
164
+ expected_posargs ,
165
+ expected_kwargs , # noqa: F811
110
166
):
111
167
"""
112
168
Test that when run is called without arguments the command runs with the
0 commit comments