Skip to content

Commit e4d0add

Browse files
committed
test strip to barebones for tests
1 parent 87c004f commit e4d0add

File tree

3 files changed

+0
-32
lines changed

3 files changed

+0
-32
lines changed

readthedocs/builds/models.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -540,12 +540,6 @@ def get_conf_py_path(self):
540540
conf_py_path = os.path.relpath(conf_py_path, checkout_prefix)
541541
return conf_py_path
542542

543-
def get_mkdocs_yml_path(self):
544-
mkdocs_yml_path = self.project.yaml_dir(self.slug)
545-
checkout_prefix = self.project.checkout_path(self.slug)
546-
mkdocs_yml_path = os.path.relpath(mkdocs_yml_path, checkout_prefix)
547-
return mkdocs_yml_path
548-
549543
def get_storage_paths(self, version_slug=None):
550544
"""
551545
Return a list of all build artifact storage paths for this version.

readthedocs/projects/models.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
from readthedocs.core.resolver import Resolver
3636
from readthedocs.core.utils import extract_valid_attributes_for_model, slugify
3737
from readthedocs.core.utils.url import unsafe_join_url_path
38-
from readthedocs.doc_builder.exceptions import MkDocsYAMLParseError
3938
from readthedocs.domains.querysets import DomainQueryset
4039
from readthedocs.domains.validators import check_domains_limit
4140
from readthedocs.notifications.models import Notification as NewNotification
@@ -970,26 +969,11 @@ def conf_file(self, version=LATEST):
970969

971970
raise ProjectConfigurationError(ProjectConfigurationError.NOT_FOUND)
972971

973-
def yaml_file(self, version=LATEST):
974-
"""Find a mkdocs ``mkdocs.yml`` file in the project checkout."""
975-
files = self.find("mkdocs.yml", version)
976-
if not files:
977-
files = self.full_find("mkdocs.yml", version)
978-
if len(files) == 1:
979-
return files[0]
980-
# TODO: Handle for multiple Files
981-
raise MkDocsYAMLParseError(MkDocsYAMLParseError.NOT_FOUND)
982-
983972
def conf_dir(self, version=LATEST):
984973
conf_file = self.conf_file(version)
985974
if conf_file:
986975
return os.path.dirname(conf_file)
987976

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-
993977
@property
994978
def has_good_build(self):
995979
# Check if there is `_good_build` annotation in the Queryset.

readthedocs/rtd_tests/tests/test_doc_builder.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -118,29 +118,19 @@ def test_multiple_conf_py(
118118
with override_settings(DOCROOT=tmp_docs_dir):
119119
base_sphinx.show_conf()
120120

121-
@patch("readthedocs.doc_builder.backends.mkdocs.BaseMkdocs.docs_dir")
122121
@patch("readthedocs.doc_builder.backends.mkdocs.BaseMkdocs.run")
123-
@patch("readthedocs.builds.models.Version.get_mkdocs_yml_path")
124-
@patch("readthedocs.projects.models.Project.checkout_path")
125122
@patch("readthedocs.doc_builder.python_environments.load_yaml_config")
126123
def test_project_without_mkdocs_yaml(
127124
self,
128125
load_yaml_config,
129-
checkout_path,
130-
get_mkdocs_yml_path,
131126
_,
132-
docs_dir,
133127
):
134128
"""
135129
Test for a project without ``mkdocs.yaml`` file.
136130
137131
When this happen, the ``get_mkdocs_yml_path`` raises a
138132
``MkDocsYAMLParseError`` which is captured by our own code.
139133
"""
140-
tmp_dir = tempfile.mkdtemp()
141-
checkout_path.return_value = tmp_dir
142-
docs_dir.return_value = tmp_dir
143-
get_mkdocs_yml_path.side_effect = MkDocsYAMLParseError
144134
python_env = Virtualenv(
145135
version=self.version,
146136
build_env=self.build_env,

0 commit comments

Comments
 (0)