Skip to content

Commit e73480f

Browse files
committed
One more test for v2
1 parent 5ae10e8 commit e73480f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

readthedocs/rtd_tests/tests/test_config_integration.py

+7
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,13 @@ def test_using_v2(self, checkout_path, tmpdir):
281281
update_docs = self.get_update_docs_task()
282282
assert update_docs.config.version == '2'
283283

284+
def test_report_using_invalid_version(self, checkout_path, tmpdir):
285+
checkout_path.return_value = str(tmpdir)
286+
self.create_config_file(tmpdir, {'version': 12})
287+
with pytest.raises(InvalidConfig) as exinfo:
288+
self.get_update_docs_task()
289+
assert exinfo.value.key == 'version'
290+
284291
@pytest.mark.parametrize('config', [{}, {'formats': []}])
285292
@patch('readthedocs.projects.models.Project.repo_nonblockinglock', new=MagicMock())
286293
@patch('readthedocs.doc_builder.backends.sphinx.SearchBuilder.build')

0 commit comments

Comments
 (0)