1# This module is used in `test_doctest`. 2# It must not have a docstring. 3 4def func_with_docstring(): 5 """Some unrelated info.""" 6 7 8def func_without_docstring(): 9 pass 10 11 12def func_with_doctest(): 13 """ 14 This function really contains a test case. 15 16 >>> func_with_doctest.__name__ 17 'func_with_doctest' 18 """ 19 return 3 20 21 22class ClassWithDocstring: 23 """Some unrelated class information.""" 24 25 26class ClassWithoutDocstring: 27 pass 28 29 30class ClassWithDoctest: 31 """This class really has a test case in it. 32 33 >>> ClassWithDoctest.__name__ 34 'ClassWithDoctest' 35 """ 36 37 38class MethodWrapper: 39 def method_with_docstring(self): 40 """Method with a docstring.""" 41 42 def method_without_docstring(self): 43 pass 44 45 def method_with_doctest(self): 46 """ 47 This has a doctest! 48 >>> MethodWrapper.method_with_doctest.__name__ 49 'method_with_doctest' 50 """ 51 52# https://github.com/python/cpython/issues/99433 53str_wrapper = object().__str__ 54