File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -400,7 +400,7 @@ def init(self) -> None:
400400
401401
402402def setup (app : Sphinx ) -> Dict [str , Any ]:
403- app .add_config_value ("rediraffe_redirects" , "" , None )
403+ app .add_config_value ("rediraffe_redirects" , None , None )
404404 app .add_config_value ("rediraffe_branch" , "" , None )
405405 app .add_config_value ("rediraffe_template" , None , None )
406406 app .add_config_value ("rediraffe_auto_redirect_perc" , 100 , None )
Original file line number Diff line number Diff line change @@ -94,7 +94,8 @@ def test_bad_rediraffe_file(self, app: Sphinx):
9494 @pytest .mark .sphinx ("html" , testroot = "no_rediraffe_file" )
9595 def test_no_rediraffe_file (self , app : Sphinx ):
9696 app .build ()
97- assert app .statuscode == 1
97+ assert app .statuscode == 0
98+ assert "rediraffe was not given redirects to process" in app ._warning .getvalue ()
9899
99100 @pytest .mark .sphinx ("html" , testroot = "redirect_from_deleted_folder" )
100101 def test_redirect_from_deleted_folder (self , app : Sphinx , ensure_redirect ):
@@ -277,7 +278,8 @@ def test_bad_rediraffe_file(self, app: Sphinx):
277278 @pytest .mark .sphinx ("dirhtml" , testroot = "no_rediraffe_file" )
278279 def test_no_rediraffe_file (self , app : Sphinx ):
279280 app .build ()
280- assert app .statuscode == 1
281+ assert app .statuscode == 0
282+ assert "rediraffe was not given redirects to process" in app ._warning .getvalue ()
281283
282284 @pytest .mark .sphinx ("dirhtml" , testroot = "redirect_from_deleted_folder" )
283285 def test_redirect_from_deleted_folder (self , app : Sphinx , ensure_redirect ):
You can’t perform that action at this time.
0 commit comments