@@ -30,6 +30,7 @@ def test_dev() -> None:
30
30
"workers" : None ,
31
31
"root_path" : "" ,
32
32
"proxy_headers" : True ,
33
+ "reload_dirs" : None ,
33
34
"log_config" : get_uvicorn_log_config (),
34
35
}
35
36
assert "Using import string: single_file_app:app" in result .output
@@ -94,6 +95,8 @@ def test_dev_args() -> None:
94
95
"--app" ,
95
96
"api" ,
96
97
"--no-proxy-headers" ,
98
+ "--reload-dirs" ,
99
+ "api,config" ,
97
100
],
98
101
)
99
102
assert result .exit_code == 0 , result .output
@@ -107,6 +110,10 @@ def test_dev_args() -> None:
107
110
"workers" : None ,
108
111
"root_path" : "/api" ,
109
112
"proxy_headers" : False ,
113
+ "reload_dirs" : [
114
+ "api" ,
115
+ "config" ,
116
+ ],
110
117
"log_config" : get_uvicorn_log_config (),
111
118
}
112
119
assert "Using import string: single_file_app:api" in result .output
@@ -134,6 +141,7 @@ def test_run() -> None:
134
141
"workers" : None ,
135
142
"root_path" : "" ,
136
143
"proxy_headers" : True ,
144
+ "reload_dirs" : None ,
137
145
"log_config" : get_uvicorn_log_config (),
138
146
}
139
147
assert "Using import string: single_file_app:app" in result .output
@@ -179,6 +187,7 @@ def test_run_args() -> None:
179
187
"workers" : 2 ,
180
188
"root_path" : "/api" ,
181
189
"proxy_headers" : False ,
190
+ "reload_dirs" : None ,
182
191
"log_config" : get_uvicorn_log_config (),
183
192
}
184
193
@@ -218,6 +227,7 @@ def test_dev_help() -> None:
218
227
assert "The root path is used to tell your app" in result .output
219
228
assert "The name of the variable that contains the FastAPI app" in result .output
220
229
assert "Use multiple worker processes." not in result .output
230
+ assert "directories to watch for changes in." in result .output
221
231
222
232
223
233
def test_run_help () -> None :
@@ -239,6 +249,7 @@ def test_run_help() -> None:
239
249
assert "The root path is used to tell your app" in result .output
240
250
assert "The name of the variable that contains the FastAPI app" in result .output
241
251
assert "Use multiple worker processes." in result .output
252
+ assert "directories to watch for changes in." not in result .output
242
253
243
254
244
255
def test_callback_help () -> None :
0 commit comments