Skip to content

Commit 3de6972

Browse files
committed
Update tests to add the new call into the mocks
1 parent 0f5080e commit 3de6972

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

readthedocs/rtd_tests/tests/test_builds.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ def test_build_pdf_latex_failures(self, load_config):
220220
returns = [
221221
((b'', b''), 0), # sphinx-build html
222222
((b'', b''), 0), # sphinx-build pdf
223+
((b'1.5', b''), 0), # sphinx version check
223224
((b'', b''), 1), # latex
224225
((b'', b''), 0), # makeindex
225226
((b'', b''), 0), # latex
@@ -236,7 +237,7 @@ def test_build_pdf_latex_failures(self, load_config):
236237

237238
with build_env:
238239
task.build_docs()
239-
self.assertEqual(self.mocks.popen.call_count, 7)
240+
self.assertEqual(self.mocks.popen.call_count, 8)
240241
self.assertTrue(build_env.failed)
241242

242243
@mock.patch('readthedocs.doc_builder.config.load_config')
@@ -271,6 +272,7 @@ def test_build_pdf_latex_not_failure(self, load_config):
271272
returns = [
272273
((b'', b''), 0), # sphinx-build html
273274
((b'', b''), 0), # sphinx-build pdf
275+
((b'1.6', b''), 0), # sphinx version check
274276
((b'Output written on foo.pdf', b''), 1), # latex
275277
((b'', b''), 0), # makeindex
276278
((b'', b''), 0), # latex
@@ -287,7 +289,7 @@ def test_build_pdf_latex_not_failure(self, load_config):
287289

288290
with build_env:
289291
task.build_docs()
290-
self.assertEqual(self.mocks.popen.call_count, 7)
292+
self.assertEqual(self.mocks.popen.call_count, 8)
291293
self.assertTrue(build_env.successful)
292294

293295
@mock.patch('readthedocs.projects.tasks.api_v2')

0 commit comments

Comments
 (0)