@@ -89,7 +89,7 @@ class TestBuildTask(BuildEnvironmentBase):
89
89
("all" , ["latex" , "readthedocssinglehtmllocalmedia" , "nepub" ]),
90
90
),
91
91
)
92
- @mock .patch ("readthedocs.doc_builder.builder .load_yaml_config" )
92
+ @mock .patch ("readthedocs.doc_builder.director .load_yaml_config" )
93
93
@pytest .mark .skip
94
94
def test_build_sphinx_formats (self , load_yaml_config , formats , builders ):
95
95
load_yaml_config .return_value = self ._config_file (
@@ -145,8 +145,8 @@ def test_build_sphinx_formats(self, load_yaml_config, formats, builders):
145
145
)
146
146
)
147
147
148
- @mock .patch ("readthedocs.doc_builder.builder .load_yaml_config" )
149
- @mock .patch ("readthedocs.doc_builder.builder.DocumentationBuilder .build_docs_class" )
148
+ @mock .patch ("readthedocs.doc_builder.director .load_yaml_config" )
149
+ @mock .patch ("readthedocs.doc_builder.director.BuildDirector .build_docs_class" )
150
150
def test_build_formats_only_html_for_external_versions (
151
151
self , build_docs_class , load_yaml_config
152
152
):
@@ -166,8 +166,8 @@ def test_build_formats_only_html_for_external_versions(
166
166
167
167
build_docs_class .assert_called_once_with ("sphinx" ) # HTML builder
168
168
169
- @mock .patch ("readthedocs.doc_builder.builder .load_yaml_config" )
170
- @mock .patch ("readthedocs.doc_builder.builder.DocumentationBuilder .build_docs_class" )
169
+ @mock .patch ("readthedocs.doc_builder.director .load_yaml_config" )
170
+ @mock .patch ("readthedocs.doc_builder.director.BuildDirector .build_docs_class" )
171
171
def test_build_respects_formats_mkdocs (self , build_docs_class , load_yaml_config ):
172
172
load_yaml_config .return_value = self ._config_file (
173
173
{
@@ -183,7 +183,7 @@ def test_build_respects_formats_mkdocs(self, build_docs_class, load_yaml_config)
183
183
184
184
build_docs_class .assert_called_once_with ("mkdocs" ) # HTML builder
185
185
186
- @mock .patch ("readthedocs.doc_builder.builder .load_yaml_config" )
186
+ @mock .patch ("readthedocs.doc_builder.director .load_yaml_config" )
187
187
@pytest .mark .skip ()
188
188
# NOTE: find a way to test we are passing all the environment variables to all the commands
189
189
def test_get_env_vars_default (self , load_yaml_config ):
@@ -236,7 +236,7 @@ def test_get_env_vars_default(self, load_yaml_config):
236
236
@mock .patch ("readthedocs.projects.tasks.builds.send_external_build_status" )
237
237
@mock .patch ("readthedocs.projects.tasks.builds.UpdateDocsTask.send_notifications" )
238
238
@mock .patch ("readthedocs.projects.tasks.builds.clean_build" )
239
- @mock .patch ("readthedocs.doc_builder.builder .load_yaml_config" )
239
+ @mock .patch ("readthedocs.doc_builder.director .load_yaml_config" )
240
240
def test_successful_build (
241
241
self ,
242
242
load_yaml_config ,
@@ -462,7 +462,7 @@ def test_failed_build(
462
462
"success" : False ,
463
463
}
464
464
465
- @mock .patch ("readthedocs.doc_builder.builder .load_yaml_config" )
465
+ @mock .patch ("readthedocs.doc_builder.director .load_yaml_config" )
466
466
def test_build_commands_executed (self , load_yaml_config ):
467
467
load_yaml_config .return_value = self ._config_file (
468
468
{
@@ -635,7 +635,7 @@ def test_build_commands_executed(self, load_yaml_config):
635
635
]
636
636
)
637
637
638
- @mock .patch ("readthedocs.doc_builder.builder .load_yaml_config" )
638
+ @mock .patch ("readthedocs.doc_builder.director .load_yaml_config" )
639
639
def test_install_apt_packages (self , load_yaml_config ):
640
640
config = BuildConfigV2 (
641
641
{},
@@ -677,7 +677,7 @@ def test_install_apt_packages(self, load_yaml_config):
677
677
]
678
678
)
679
679
680
- @mock .patch ("readthedocs.doc_builder.builder .load_yaml_config" )
680
+ @mock .patch ("readthedocs.doc_builder.director .load_yaml_config" )
681
681
def test_build_tools (self , load_yaml_config ):
682
682
config = BuildConfigV2 (
683
683
{},
@@ -732,7 +732,7 @@ def test_build_tools(self, load_yaml_config):
732
732
733
733
@mock .patch ("readthedocs.doc_builder.python_environments.tarfile" )
734
734
@mock .patch ("readthedocs.doc_builder.python_environments.build_tools_storage" )
735
- @mock .patch ("readthedocs.doc_builder.builder .load_yaml_config" )
735
+ @mock .patch ("readthedocs.doc_builder.director .load_yaml_config" )
736
736
def test_build_tools_cached (self , load_yaml_config , build_tools_storage , tarfile ):
737
737
config = BuildConfigV2 (
738
738
{},
@@ -803,7 +803,7 @@ def test_build_tools_cached(self, load_yaml_config, build_tools_storage, tarfile
803
803
]
804
804
)
805
805
806
- @mock .patch ("readthedocs.doc_builder.builder .load_yaml_config" )
806
+ @mock .patch ("readthedocs.doc_builder.director .load_yaml_config" )
807
807
def test_requirements_from_config_file_installed (self , load_yaml_config ):
808
808
load_yaml_config .return_value = self ._config_file (
809
809
{
@@ -837,7 +837,7 @@ def test_requirements_from_config_file_installed(self, load_yaml_config):
837
837
]
838
838
)
839
839
840
- @mock .patch ("readthedocs.doc_builder.builder .load_yaml_config" )
840
+ @mock .patch ("readthedocs.doc_builder.director .load_yaml_config" )
841
841
def test_conda_config_calls_conda_command (self , load_yaml_config ):
842
842
load_yaml_config .return_value = self ._config_file (
843
843
{
@@ -895,7 +895,7 @@ def test_conda_config_calls_conda_command(self, load_yaml_config):
895
895
]
896
896
)
897
897
898
- @mock .patch ("readthedocs.doc_builder.builder .load_yaml_config" )
898
+ @mock .patch ("readthedocs.doc_builder.director .load_yaml_config" )
899
899
def test_python_mamba_commands (self , load_yaml_config ):
900
900
load_yaml_config .return_value = self ._config_file (
901
901
{
@@ -947,7 +947,7 @@ def test_python_mamba_commands(self, load_yaml_config):
947
947
]
948
948
)
949
949
950
- @mock .patch ("readthedocs.doc_builder.builder .load_yaml_config" )
950
+ @mock .patch ("readthedocs.doc_builder.director .load_yaml_config" )
951
951
def test_sphinx_fail_on_warning (self , load_yaml_config ):
952
952
load_yaml_config .return_value = self ._config_file (
953
953
{
@@ -985,7 +985,7 @@ def test_sphinx_fail_on_warning(self, load_yaml_config):
985
985
]
986
986
)
987
987
988
- @mock .patch ("readthedocs.doc_builder.builder .load_yaml_config" )
988
+ @mock .patch ("readthedocs.doc_builder.director .load_yaml_config" )
989
989
def test_mkdocs_fail_on_warning (self , load_yaml_config ):
990
990
load_yaml_config .return_value = self ._config_file (
991
991
{
@@ -1018,7 +1018,7 @@ def test_mkdocs_fail_on_warning(self, load_yaml_config):
1018
1018
]
1019
1019
)
1020
1020
1021
- @mock .patch ("readthedocs.doc_builder.builder .load_yaml_config" )
1021
+ @mock .patch ("readthedocs.doc_builder.director .load_yaml_config" )
1022
1022
def test_system_site_packages (self , load_yaml_config ):
1023
1023
load_yaml_config .return_value = self ._config_file (
1024
1024
{
@@ -1044,7 +1044,7 @@ def test_system_site_packages(self, load_yaml_config):
1044
1044
]
1045
1045
)
1046
1046
1047
- @mock .patch ("readthedocs.doc_builder.builder .load_yaml_config" )
1047
+ @mock .patch ("readthedocs.doc_builder.director .load_yaml_config" )
1048
1048
def test_system_site_packages_project_overrides (self , load_yaml_config ):
1049
1049
load_yaml_config .return_value = self ._config_file (
1050
1050
{
@@ -1074,7 +1074,7 @@ def test_system_site_packages_project_overrides(self, load_yaml_config):
1074
1074
]
1075
1075
)
1076
1076
1077
- @mock .patch ("readthedocs.doc_builder.builder .load_yaml_config" )
1077
+ @mock .patch ("readthedocs.doc_builder.director .load_yaml_config" )
1078
1078
def test_python_install_setuptools (self , load_yaml_config ):
1079
1079
load_yaml_config .return_value = self ._config_file (
1080
1080
{
@@ -1105,7 +1105,7 @@ def test_python_install_setuptools(self, load_yaml_config):
1105
1105
]
1106
1106
)
1107
1107
1108
- @mock .patch ("readthedocs.doc_builder.builder .load_yaml_config" )
1108
+ @mock .patch ("readthedocs.doc_builder.director .load_yaml_config" )
1109
1109
def test_python_install_pip (self , load_yaml_config ):
1110
1110
load_yaml_config .return_value = self ._config_file (
1111
1111
{
@@ -1141,7 +1141,7 @@ def test_python_install_pip(self, load_yaml_config):
1141
1141
]
1142
1142
)
1143
1143
1144
- @mock .patch ("readthedocs.doc_builder.builder .load_yaml_config" )
1144
+ @mock .patch ("readthedocs.doc_builder.director .load_yaml_config" )
1145
1145
def test_python_install_pip_extras (self , load_yaml_config ):
1146
1146
# FIXME: the test passes but in the logs there is an error related to
1147
1147
# `backends/sphinx.py` not finding a file.
@@ -1182,7 +1182,7 @@ def test_python_install_pip_extras(self, load_yaml_config):
1182
1182
]
1183
1183
)
1184
1184
1185
- @mock .patch ("readthedocs.doc_builder.builder .load_yaml_config" )
1185
+ @mock .patch ("readthedocs.doc_builder.director .load_yaml_config" )
1186
1186
def test_python_install_pip_several_options (self , load_yaml_config ):
1187
1187
load_yaml_config .return_value = self ._config_file (
1188
1188
{
@@ -1253,7 +1253,7 @@ def test_python_install_pip_several_options(self, load_yaml_config):
1253
1253
(["one" , "two" ], ["one" , "two" ]),
1254
1254
],
1255
1255
)
1256
- @mock .patch ("readthedocs.doc_builder.builder .load_yaml_config" )
1256
+ @mock .patch ("readthedocs.doc_builder.director .load_yaml_config" )
1257
1257
def test_submodules_include (self , load_yaml_config , value , expected ):
1258
1258
load_yaml_config .return_value = self ._config_file (
1259
1259
{
@@ -1273,7 +1273,7 @@ def test_submodules_include(self, load_yaml_config, value, expected):
1273
1273
]
1274
1274
)
1275
1275
1276
- @mock .patch ("readthedocs.doc_builder.builder .load_yaml_config" )
1276
+ @mock .patch ("readthedocs.doc_builder.director .load_yaml_config" )
1277
1277
def test_submodules_exclude (self , load_yaml_config ):
1278
1278
load_yaml_config .return_value = self ._config_file (
1279
1279
{
@@ -1300,7 +1300,7 @@ def test_submodules_exclude(self, load_yaml_config):
1300
1300
]
1301
1301
)
1302
1302
1303
- @mock .patch ("readthedocs.doc_builder.builder .load_yaml_config" )
1303
+ @mock .patch ("readthedocs.doc_builder.director .load_yaml_config" )
1304
1304
def test_submodules_exclude_all (self , load_yaml_config ):
1305
1305
load_yaml_config .return_value = self ._config_file (
1306
1306
{
@@ -1328,7 +1328,7 @@ def test_submodules_exclude_all(self, load_yaml_config):
1328
1328
("singlehtml" , "readthedocssinglehtml" ),
1329
1329
],
1330
1330
)
1331
- @mock .patch ("readthedocs.doc_builder.builder .load_yaml_config" )
1331
+ @mock .patch ("readthedocs.doc_builder.director .load_yaml_config" )
1332
1332
def test_sphinx_builder (self , load_yaml_config , value , command ):
1333
1333
load_yaml_config .return_value = self ._config_file (
1334
1334
{
@@ -1366,7 +1366,7 @@ def test_sphinx_builder(self, load_yaml_config, value, command):
1366
1366
1367
1367
1368
1368
class TestBuildTaskExceptionHandler (BuildEnvironmentBase ):
1369
- @mock .patch ("readthedocs.doc_builder.builder .load_yaml_config" )
1369
+ @mock .patch ("readthedocs.doc_builder.director .load_yaml_config" )
1370
1370
def test_config_file_exception (self , load_yaml_config ):
1371
1371
load_yaml_config .side_effect = ConfigError (
1372
1372
code = "invalid" , message = "Invalid version in config file."
0 commit comments