@@ -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
@@ -59,6 +60,7 @@ def test_dev_package() -> None:
5960 "workers" : None ,
6061 "root_path" : "" ,
6162 "proxy_headers" : True ,
63+ "reload_dirs" : None ,
6264 "log_config" : get_uvicorn_log_config (),
6365 }
6466 assert "Using import string: nested_package.package:app" in result .output
@@ -94,6 +96,8 @@ def test_dev_args() -> None:
9496 "--app" ,
9597 "api" ,
9698 "--no-proxy-headers" ,
99+ "--reload-dirs" ,
100+ "api,config" ,
97101 ],
98102 )
99103 assert result .exit_code == 0 , result .output
@@ -107,6 +111,10 @@ def test_dev_args() -> None:
107111 "workers" : None ,
108112 "root_path" : "/api" ,
109113 "proxy_headers" : False ,
114+ "reload_dirs" : [
115+ "api" ,
116+ "config" ,
117+ ],
110118 "log_config" : get_uvicorn_log_config (),
111119 }
112120 assert "Using import string: single_file_app:api" in result .output
@@ -134,6 +142,7 @@ def test_run() -> None:
134142 "workers" : None ,
135143 "root_path" : "" ,
136144 "proxy_headers" : True ,
145+ "reload_dirs" : None ,
137146 "log_config" : get_uvicorn_log_config (),
138147 }
139148 assert "Using import string: single_file_app:app" in result .output
@@ -179,6 +188,7 @@ def test_run_args() -> None:
179188 "workers" : 2 ,
180189 "root_path" : "/api" ,
181190 "proxy_headers" : False ,
191+ "reload_dirs" : None ,
182192 "log_config" : get_uvicorn_log_config (),
183193 }
184194
@@ -218,6 +228,7 @@ def test_dev_help() -> None:
218228 assert "The root path is used to tell your app" in result .output
219229 assert "The name of the variable that contains the FastAPI app" in result .output
220230 assert "Use multiple worker processes." not in result .output
231+ assert "directories to watch for changes in." in result .output
221232
222233
223234def test_run_help () -> None :
@@ -239,6 +250,7 @@ def test_run_help() -> None:
239250 assert "The root path is used to tell your app" in result .output
240251 assert "The name of the variable that contains the FastAPI app" in result .output
241252 assert "Use multiple worker processes." in result .output
253+ assert "directories to watch for changes in." not in result .output
242254
243255
244256def test_callback_help () -> None :
0 commit comments