From 740b964d453736630845fc704f6bfcff9c18a005 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Wed, 17 Apr 2024 21:50:46 +0100 Subject: [PATCH] fixup! Elaborate a little more in the warning message for ``config.cache`` --- tests/test_builders/test_build_warnings.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_builders/test_build_warnings.py b/tests/test_builders/test_build_warnings.py index 8605d5d26ef..eeb7e9d838b 100644 --- a/tests/test_builders/test_build_warnings.py +++ b/tests/test_builders/test_build_warnings.py @@ -73,8 +73,8 @@ def test_texinfo_warnings(app, warning): def test_uncacheable_config_warning(make_app, tmp_path): - """Test than an unpickleable config value raises a warning.""" - tmp_path.joinpath('conf.py').write_text(""" + """Test that an unpickleable config value raises a warning.""" + tmp_path.joinpath('conf.py').write_text("""\ my_config = lambda: None show_warning_types = True def setup(app): @@ -84,5 +84,6 @@ def setup(app): app = make_app(srcdir=tmp_path) app.build() assert strip_colors(app.warning.getvalue()).strip() == ( - "WARNING: cannot cache unpickable configuration value: 'my_config' [config.cache]" + "WARNING: cannot cache unpickable configuration value: 'my_config' " + "(because it contains a function, class, or module object) [config.cache]" )