Skip to content

Commit

Permalink
fixup! Elaborate a little more in the warning message for ``config.ca…
Browse files Browse the repository at this point in the history
…che``
  • Loading branch information
AA-Turner committed Apr 17, 2024
1 parent 141f3ec commit 740b964
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/test_builders/test_build_warnings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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]"
)

0 comments on commit 740b964

Please sign in to comment.