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

Method test_print

Lib/test/test_argparse.py:4173–4183  ·  view source on GitHub ↗
(self, tester)

Source from the content-addressed store, hash-verified

4171
4172 @force_not_colorized
4173 def test_print(self, tester):
4174 parser = self._get_parser(tester)
4175 print_ = getattr(parser, 'print_%s' % self.func_suffix)
4176 old_stream = getattr(sys, self.std_name)
4177 setattr(sys, self.std_name, StdIOBuffer())
4178 try:
4179 print_()
4180 parser_text = getattr(sys, self.std_name).getvalue()
4181 finally:
4182 setattr(sys, self.std_name, old_stream)
4183 self._test(tester, parser_text)
4184
4185 @force_not_colorized
4186 def test_print_file(self, tester):

Callers

nothing calls this directly

Calls 5

_get_parserMethod · 0.95
_testMethod · 0.95
StdIOBufferClass · 0.85
print_Function · 0.85
getvalueMethod · 0.45

Tested by

no test coverage detected