@@ -30,6 +30,7 @@ def test_dev() -> None:
3030 "workers" : None ,
3131 "root_path" : "" ,
3232 "proxy_headers" : True ,
33+ "reload_dirs" : None ,
3334 "log_config" : get_uvicorn_log_config (),
3435 }
3536 assert "Using import string: single_file_app:app" in result .output
@@ -94,6 +95,8 @@ def test_dev_args() -> None:
9495 "--app" ,
9596 "api" ,
9697 "--no-proxy-headers" ,
98+ "--reload-dirs" ,
99+ "api,config" ,
97100 ],
98101 )
99102 assert result .exit_code == 0 , result .output
@@ -107,6 +110,10 @@ def test_dev_args() -> None:
107110 "workers" : None ,
108111 "root_path" : "/api" ,
109112 "proxy_headers" : False ,
113+ "reload_dirs" : [
114+ "api" ,
115+ "config" ,
116+ ],
110117 "log_config" : get_uvicorn_log_config (),
111118 }
112119 assert "Using import string: single_file_app:api" in result .output
@@ -134,6 +141,7 @@ def test_run() -> None:
134141 "workers" : None ,
135142 "root_path" : "" ,
136143 "proxy_headers" : True ,
144+ "reload_dirs" : None ,
137145 "log_config" : get_uvicorn_log_config (),
138146 }
139147 assert "Using import string: single_file_app:app" in result .output
@@ -179,6 +187,7 @@ def test_run_args() -> None:
179187 "workers" : 2 ,
180188 "root_path" : "/api" ,
181189 "proxy_headers" : False ,
190+ "reload_dirs" : None ,
182191 "log_config" : get_uvicorn_log_config (),
183192 }
184193
@@ -218,6 +227,7 @@ def test_dev_help() -> None:
218227 assert "The root path is used to tell your app" in result .output
219228 assert "The name of the variable that contains the FastAPI app" in result .output
220229 assert "Use multiple worker processes." not in result .output
230+ assert "directories to watch for changes in." in result .output
221231
222232
223233def test_run_help () -> None :
@@ -239,6 +249,7 @@ def test_run_help() -> None:
239249 assert "The root path is used to tell your app" in result .output
240250 assert "The name of the variable that contains the FastAPI app" in result .output
241251 assert "Use multiple worker processes." in result .output
252+ assert "directories to watch for changes in." not in result .output
242253
243254
244255def test_callback_help () -> None :
0 commit comments