@@ -613,6 +613,35 @@ def test_sphinx_builder_default(
613
613
614
614
get_builder_class .assert_called_with ('sphinx' )
615
615
616
+ @patch ('readthedocs.doc_builder.backends.sphinx.BaseSphinx.move' )
617
+ @patch ('readthedocs.doc_builder.backends.sphinx.BaseSphinx.append_conf' )
618
+ @patch ('readthedocs.doc_builder.backends.sphinx.BaseSphinx.run' )
619
+ def test_sphinx_configuration_default (
620
+ self , run , append_conf , move , checkout_path , tmpdir ):
621
+ """Should be default to find a conf.py file."""
622
+ checkout_path .return_value = str (tmpdir )
623
+
624
+ apply_fs (tmpdir , {'conf.py' : '' })
625
+ self .create_config_file (tmpdir , {})
626
+ self .project .conf_py_file = ''
627
+ self .project .save ()
628
+
629
+ update_docs = self .get_update_docs_task ()
630
+ config = update_docs .config
631
+ python_env = Virtualenv (
632
+ version = self .version ,
633
+ build_env = update_docs .build_env ,
634
+ config = config
635
+ )
636
+ update_docs .python_env = python_env
637
+
638
+ update_docs .build_docs_html ()
639
+
640
+ args , kwargs = run .call_args
641
+ assert kwargs ['cwd' ] == str (tmpdir )
642
+ append_conf .assert_called_once ()
643
+ move .assert_called_once ()
644
+
616
645
@patch ('readthedocs.doc_builder.backends.sphinx.BaseSphinx.move' )
617
646
@patch ('readthedocs.doc_builder.backends.sphinx.BaseSphinx.append_conf' )
618
647
@patch ('readthedocs.doc_builder.backends.sphinx.BaseSphinx.run' )
0 commit comments