Skip to content

Commit 0a50bef

Browse files
committed
readded get_mkdocs_yml_path
1 parent 4f64d9a commit 0a50bef

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

readthedocs/projects/models.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,12 @@ def conf_dir(self, version=LATEST):
984984
conf_file = self.conf_file(version)
985985
if conf_file:
986986
return os.path.dirname(conf_file)
987-
987+
988+
def yaml_dir(self, version=LATEST):
989+
yaml_file = self.yaml_file(version)
990+
if yaml_file:
991+
return os.path.dirname(yaml_file)
992+
988993
@property
989994
def has_good_build(self):
990995
# Check if there is `_good_build` annotation in the Queryset.

readthedocs/rtd_tests/tests/test_doc_builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def setUp(self):
138138

139139
@patch("readthedocs.doc_builder.backends.mkdocs.BaseMkdocs.docs_dir")
140140
@patch("readthedocs.doc_builder.backends.mkdocs.BaseMkdocs.run")
141-
@patch("readthedocs.builds.models.Version.get_conf_py_path")
141+
@patch("readthedocs.builds.models.Version.get_mkdocs_yml_path")
142142
@patch("readthedocs.projects.models.Project.checkout_path")
143143
@patch("readthedocs.doc_builder.python_environments.load_yaml_config")
144144
def test_project_without_mkdocs_yaml(

0 commit comments

Comments
 (0)