From c0c8eb8b8f89d593eae9c12a11ef9f438df5f0ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lum=C3=ADr=20=27Frenzy=27=20Balhar?= Date: Wed, 21 Aug 2024 14:03:27 +0200 Subject: [PATCH] Make tests compatible with Python 3.13 (#3924) Python compiler newly removes indent from docstrings https://github.com/python/cpython/issues/81283 --- python/ipywidgets/ipywidgets/widgets/tests/test_docutils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/ipywidgets/ipywidgets/widgets/tests/test_docutils.py b/python/ipywidgets/ipywidgets/widgets/tests/test_docutils.py index 1f8b09aa34..462293326c 100644 --- a/python/ipywidgets/ipywidgets/widgets/tests/test_docutils.py +++ b/python/ipywidgets/ipywidgets/widgets/tests/test_docutils.py @@ -15,7 +15,7 @@ def test_substitution(self): def f(): """ Docstring with value {key} """ - assert f.__doc__ == " Docstring with value 62 " + assert "Docstring with value 62" in f.__doc__ def test_unused_keys(self): snippets = {'key': '62', 'other-key': 'unused'} @@ -24,4 +24,4 @@ def test_unused_keys(self): def f(): """ Docstring with value {key} """ - assert f.__doc__ == " Docstring with value 62 " + assert "Docstring with value 62" in f.__doc__