diff --git a/src/icalendar/tests/test_with_doctest.py b/src/icalendar/tests/test_with_doctest.py index 7710a003..5912d6f7 100644 --- a/src/icalendar/tests/test_with_doctest.py +++ b/src/icalendar/tests/test_with_doctest.py @@ -75,7 +75,8 @@ def test_documentation_file(document, zoneinfo_only, env_for_doctest, tzp): functions are also replaced to work. """ try: - test_result = doctest.testfile(document, module_relative=False, globs=env_for_doctest, raise_on_error=False) + # set raise_on_error to False if you wand to see the error for debug + test_result = doctest.testfile(document, module_relative=False, globs=env_for_doctest, raise_on_error=True) except doctest.UnexpectedException as e: ty, err, tb = e.exc_info if issubclass(ty, ModuleNotFoundError) and err.name == "pytz":