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