From ade8831ef49ec7c54a4d2b1bff19b90bc0a5c0ee Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 26 Jul 2024 20:53:08 -0400 Subject: [PATCH] Disable doctests on Python 3.11.9+ but not 3.12. Workaround for python/cpython#117692. Closes #231 --- conftest.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 conftest.py diff --git a/conftest.py b/conftest.py new file mode 100644 index 0000000..bdac153 --- /dev/null +++ b/conftest.py @@ -0,0 +1,13 @@ +import sys + + +def pytest_configure(config): + disable_broken_doctests(config) + + +def disable_broken_doctests(config): + """ + Workaround for python/cpython#117692. + """ + if (3, 11, 9) <= sys.version_info < (3, 12): + config.option.doctestmodules = False