MCPcopy Index your code
hub / github.com/python/cpython / __getattribute__

Method __getattribute__

Lib/test/test_builtin.py:1865–1873  ·  view source on GitHub ↗
(self, name)

Source from the content-addressed store, hash-verified

1863 def test_input_gh130163(self):
1864 class X(io.StringIO):
1865 def __getattribute__(self, name):
1866 nonlocal patch
1867 if patch:
1868 patch = False
1869 sys.stdout = X()
1870 sys.stderr = X()
1871 sys.stdin = X('input\n')
1872 support.gc_collect()
1873 return io.StringIO.__getattribute__(self, name)
1874
1875 with (support.swap_attr(sys, 'stdout', None),
1876 support.swap_attr(sys, 'stderr', None),

Callers

nothing calls this directly

Calls 1

XClass · 0.70

Tested by

no test coverage detected