Skip to content

Commit dd73d84

Browse files
authored
Fix tests around jinja2 (#9050)
1 parent 5c324c9 commit dd73d84

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

readthedocs/projects/tests/test_build_tasks.py

+1
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,7 @@ def test_build_commands_executed(self, load_yaml_config):
524524
"sphinx<2",
525525
"sphinx-rtd-theme<0.5",
526526
"readthedocs-sphinx-ext<2.2",
527+
"jinja2<3.1.0",
527528
bin_path=mock.ANY,
528529
cwd=mock.ANY,
529530
),

readthedocs/rtd_tests/tests/test_doc_building.py

+14-12
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
from itertools import zip_longest
21
import os
32
import tempfile
43
import uuid
4+
from itertools import zip_longest
55
from unittest import mock
66
from unittest.mock import Mock, PropertyMock, patch
77

@@ -407,11 +407,12 @@ def test_install_core_requirements_sphinx(self, checkout_path):
407407
)
408408
python_env.install_core_requirements()
409409
requirements_sphinx = [
410-
'commonmark',
411-
'recommonmark',
412-
'sphinx',
413-
'sphinx-rtd-theme',
414-
'readthedocs-sphinx-ext',
410+
"commonmark",
411+
"recommonmark",
412+
"sphinx",
413+
"sphinx-rtd-theme",
414+
"readthedocs-sphinx-ext",
415+
"jinja2<3.1.0",
415416
]
416417

417418
self.assertEqual(self.build_env_mock.run.call_count, 2)
@@ -444,12 +445,13 @@ def test_install_core_requirements_sphinx_system_packages_caps_setuptools(self,
444445
)
445446
python_env.install_core_requirements()
446447
requirements_sphinx = [
447-
'commonmark',
448-
'recommonmark',
449-
'sphinx',
450-
'sphinx-rtd-theme',
451-
'readthedocs-sphinx-ext',
452-
'setuptools<58.3.0',
448+
"commonmark",
449+
"recommonmark",
450+
"sphinx",
451+
"sphinx-rtd-theme",
452+
"readthedocs-sphinx-ext",
453+
"jinja2<3.1.0",
454+
"setuptools<58.3.0",
453455
]
454456

455457
self.assertEqual(self.build_env_mock.run.call_count, 2)

0 commit comments

Comments
 (0)