diff options
-rw-r--r-- | sphinx/application.py | 6 | ||||
-rw-r--r-- | tests/test_application.py | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/sphinx/application.py b/sphinx/application.py index 35110c0cd..227c1fb54 100644 --- a/sphinx/application.py +++ b/sphinx/application.py @@ -687,8 +687,10 @@ class Sphinx(object): """ if typ == 'read': attrname = 'parallel_read_safe' + gerund_typ = __("reading") elif typ == 'write': attrname = 'parallel_write_safe' + gerund_typ = __("writing") else: raise ValueError('parallel type %s is not supported' % typ) @@ -696,9 +698,9 @@ class Sphinx(object): allowed = getattr(ext, attrname, None) if allowed is None: logger.warning(__("the %s extension does not declare if it is safe " - "for parallel %sing, assuming it isn't - please " + "for parallel %s, assuming it isn't - please " "ask the extension author to check and make it " - "explicit"), ext.name, typ) + "explicit"), ext.name, gerund_typ) logger.warning('doing serial %s', typ) return False elif not allowed: diff --git a/tests/test_application.py b/tests/test_application.py index 12b6bbe60..c4c2e579b 100644 --- a/tests/test_application.py +++ b/tests/test_application.py @@ -106,7 +106,8 @@ def test_add_is_parallel_allowed(app, status, warning): app.setup_extension('write_parallel') assert app.is_parallel_allowed('read') is False assert app.is_parallel_allowed('write') is True - assert 'the write_parallel extension does not declare' in warning.getvalue() + assert ("the write_parallel extension does not declare if it is safe " + "for parallel reading, assuming it isn't - please ") in warning.getvalue() app.extensions.pop('write_parallel') warning.truncate(0) # reset warnings @@ -119,6 +120,7 @@ def test_add_is_parallel_allowed(app, status, warning): app.setup_extension('write_serial') assert app.is_parallel_allowed('read') is False assert app.is_parallel_allowed('write') is False - assert 'the write_serial extension does not declare' in warning.getvalue() + assert ("the write_serial extension does not declare if it is safe " + "for parallel reading, assuming it isn't - please ") in warning.getvalue() app.extensions.pop('write_serial') warning.truncate(0) # reset warnings |