@@ -1907,18 +1907,28 @@ def test_text_doc_routines_in_class(self, cls=pydocfodder.B):
1907
1907
self .assertIn (' | global_func(x, y) from test.test_pydoc.pydocfodder' , lines )
1908
1908
self .assertIn (' | global_func_alias = global_func(x, y)' , lines )
1909
1909
self .assertIn (' | global_func2_alias = global_func2(x, y) from test.test_pydoc.pydocfodder' , lines )
1910
- self .assertIn (' | count(self, value, /) from builtins.list' , lines )
1911
- self .assertIn (' | list_count = count(self, value, /)' , lines )
1912
- self .assertIn (' | __repr__(self, /) from builtins.object' , lines )
1913
- self .assertIn (' | object_repr = __repr__(self, /)' , lines )
1910
+ if not support .MISSING_C_DOCSTRINGS :
1911
+ self .assertIn (' | count(self, value, /) from builtins.list' , lines )
1912
+ self .assertIn (' | list_count = count(self, value, /)' , lines )
1913
+ self .assertIn (' | __repr__(self, /) from builtins.object' , lines )
1914
+ self .assertIn (' | object_repr = __repr__(self, /)' , lines )
1915
+ else :
1916
+ self .assertIn (' | count(self, object, /) from builtins.list' , lines )
1917
+ self .assertIn (' | list_count = count(self, object, /)' , lines )
1918
+ self .assertIn (' | __repr__(...) from builtins.object' , lines )
1919
+ self .assertIn (' | object_repr = __repr__(...)' , lines )
1914
1920
1915
1921
lines = self .getsection (result , f' | Static methods { where } :' , ' | ' + '-' * 70 )
1916
1922
self .assertIn (' | A_classmethod_ref = A_classmethod(x) class method of test.test_pydoc.pydocfodder.A' , lines )
1917
1923
note = '' if cls is pydocfodder .B else ' class method of test.test_pydoc.pydocfodder.B'
1918
1924
self .assertIn (' | B_classmethod_ref = B_classmethod(x)' + note , lines )
1919
1925
self .assertIn (' | A_method_ref = A_method() method of test.test_pydoc.pydocfodder.A instance' , lines )
1920
- self .assertIn (' | get(key, default=None, /) method of builtins.dict instance' , lines )
1921
- self .assertIn (' | dict_get = get(key, default=None, /) method of builtins.dict instance' , lines )
1926
+ if not support .MISSING_C_DOCSTRINGS :
1927
+ self .assertIn (' | get(key, default=None, /) method of builtins.dict instance' , lines )
1928
+ self .assertIn (' | dict_get = get(key, default=None, /) method of builtins.dict instance' , lines )
1929
+ else :
1930
+ self .assertIn (' | get(...) method of builtins.dict instance' , lines )
1931
+ self .assertIn (' | dict_get = get(...) method of builtins.dict instance' , lines )
1922
1932
1923
1933
lines = self .getsection (result , f' | Class methods { where } :' , ' | ' + '-' * 70 )
1924
1934
self .assertIn (' | B_classmethod(x)' , lines )
@@ -1937,10 +1947,16 @@ def test_html_doc_routines_in_class(self, cls=pydocfodder.B):
1937
1947
self .assertIn ('global_func(x, y) from test.test_pydoc.pydocfodder' , lines )
1938
1948
self .assertIn ('global_func_alias = global_func(x, y)' , lines )
1939
1949
self .assertIn ('global_func2_alias = global_func2(x, y) from test.test_pydoc.pydocfodder' , lines )
1940
- self .assertIn ('count(self, value, /) from builtins.list' , lines )
1941
- self .assertIn ('list_count = count(self, value, /)' , lines )
1942
- self .assertIn ('__repr__(self, /) from builtins.object' , lines )
1943
- self .assertIn ('object_repr = __repr__(self, /)' , lines )
1950
+ if not support .MISSING_C_DOCSTRINGS :
1951
+ self .assertIn ('count(self, value, /) from builtins.list' , lines )
1952
+ self .assertIn ('list_count = count(self, value, /)' , lines )
1953
+ self .assertIn ('__repr__(self, /) from builtins.object' , lines )
1954
+ self .assertIn ('object_repr = __repr__(self, /)' , lines )
1955
+ else :
1956
+ self .assertIn ('count(self, object, /) from builtins.list' , lines )
1957
+ self .assertIn ('list_count = count(self, object, /)' , lines )
1958
+ self .assertIn ('__repr__(...) from builtins.object' , lines )
1959
+ self .assertIn ('object_repr = __repr__(...)' , lines )
1944
1960
1945
1961
lines = self .getsection (result , f'Static methods { where } :' , '-' * 70 )
1946
1962
self .assertIn ('A_classmethod_ref = A_classmethod(x) class method of test.test_pydoc.pydocfodder.A' , lines )
@@ -1977,15 +1993,27 @@ def test_text_doc_routines_in_module(self):
1977
1993
self .assertIn (' A_method3 = A_method() method of B instance' , lines )
1978
1994
self .assertIn (' A_staticmethod_ref = A_staticmethod(x, y)' , lines )
1979
1995
self .assertIn (' A_staticmethod_ref2 = A_staticmethod(y) method of B instance' , lines )
1980
- self .assertIn (' get(key, default=None, /) method of builtins.dict instance' , lines )
1981
- self .assertIn (' dict_get = get(key, default=None, /) method of builtins.dict instance' , lines )
1996
+ if not support .MISSING_C_DOCSTRINGS :
1997
+ self .assertIn (' get(key, default=None, /) method of builtins.dict instance' , lines )
1998
+ self .assertIn (' dict_get = get(key, default=None, /) method of builtins.dict instance' , lines )
1999
+ else :
2000
+ self .assertIn (' get(...) method of builtins.dict instance' , lines )
2001
+ self .assertIn (' dict_get = get(...) method of builtins.dict instance' , lines )
2002
+
1982
2003
# unbound methods
1983
2004
self .assertIn (' B_method(self)' , lines )
1984
2005
self .assertIn (' B_method2 = B_method(self)' , lines )
1985
- self .assertIn (' count(self, value, /) unbound builtins.list method' , lines )
1986
- self .assertIn (' list_count = count(self, value, /) unbound builtins.list method' , lines )
1987
- self .assertIn (' __repr__(self, /) unbound builtins.object method' , lines )
1988
- self .assertIn (' object_repr = __repr__(self, /) unbound builtins.object method' , lines )
2006
+ if not support .MISSING_C_DOCSTRINGS :
2007
+ self .assertIn (' count(self, value, /) unbound builtins.list method' , lines )
2008
+ self .assertIn (' list_count = count(self, value, /) unbound builtins.list method' , lines )
2009
+ self .assertIn (' __repr__(self, /) unbound builtins.object method' , lines )
2010
+ self .assertIn (' object_repr = __repr__(self, /) unbound builtins.object method' , lines )
2011
+ else :
2012
+ self .assertIn (' count(self, object, /) unbound builtins.list method' , lines )
2013
+ self .assertIn (' list_count = count(self, object, /) unbound builtins.list method' , lines )
2014
+ self .assertIn (' __repr__(...) unbound builtins.object method' , lines )
2015
+ self .assertIn (' object_repr = __repr__(...) unbound builtins.object method' , lines )
2016
+
1989
2017
1990
2018
def test_html_doc_routines_in_module (self ):
1991
2019
doc = pydoc .HTMLDoc ()
@@ -2006,15 +2034,25 @@ def test_html_doc_routines_in_module(self):
2006
2034
self .assertIn (' A_method3 = A_method() method of B instance' , lines )
2007
2035
self .assertIn (' A_staticmethod_ref = A_staticmethod(x, y)' , lines )
2008
2036
self .assertIn (' A_staticmethod_ref2 = A_staticmethod(y) method of B instance' , lines )
2009
- self .assertIn (' get(key, default=None, /) method of builtins.dict instance' , lines )
2010
- self .assertIn (' dict_get = get(key, default=None, /) method of builtins.dict instance' , lines )
2037
+ if not support .MISSING_C_DOCSTRINGS :
2038
+ self .assertIn (' get(key, default=None, /) method of builtins.dict instance' , lines )
2039
+ self .assertIn (' dict_get = get(key, default=None, /) method of builtins.dict instance' , lines )
2040
+ else :
2041
+ self .assertIn (' get(...) method of builtins.dict instance' , lines )
2042
+ self .assertIn (' dict_get = get(...) method of builtins.dict instance' , lines )
2011
2043
# unbound methods
2012
2044
self .assertIn (' B_method(self)' , lines )
2013
2045
self .assertIn (' B_method2 = B_method(self)' , lines )
2014
- self .assertIn (' count(self, value, /) unbound builtins.list method' , lines )
2015
- self .assertIn (' list_count = count(self, value, /) unbound builtins.list method' , lines )
2016
- self .assertIn (' __repr__(self, /) unbound builtins.object method' , lines )
2017
- self .assertIn (' object_repr = __repr__(self, /) unbound builtins.object method' , lines )
2046
+ if not support .MISSING_C_DOCSTRINGS :
2047
+ self .assertIn (' count(self, value, /) unbound builtins.list method' , lines )
2048
+ self .assertIn (' list_count = count(self, value, /) unbound builtins.list method' , lines )
2049
+ self .assertIn (' __repr__(self, /) unbound builtins.object method' , lines )
2050
+ self .assertIn (' object_repr = __repr__(self, /) unbound builtins.object method' , lines )
2051
+ else :
2052
+ self .assertIn (' count(self, object, /) unbound builtins.list method' , lines )
2053
+ self .assertIn (' list_count = count(self, object, /) unbound builtins.list method' , lines )
2054
+ self .assertIn (' __repr__(...) unbound builtins.object method' , lines )
2055
+ self .assertIn (' object_repr = __repr__(...) unbound builtins.object method' , lines )
2018
2056
2019
2057
2020
2058
@unittest .skipIf (
0 commit comments