Issue #17041: Fix testing when Python is configured with the
--without-doc-strings.
Fix skip conditions in some docstings tests.