MCPcopy Index your code
hub / github.com/RustPython/RustPython / __init__

Method __init__

Lib/test/test_argparse.py:268–285  ·  view source on GitHub ↗
(self, tester_cls, add_arguments, parse_args)

Source from the content-addressed store, hash-verified

266 class AddTests(object):
267
268 def __init__(self, tester_cls, add_arguments, parse_args):
269 self._add_arguments = add_arguments
270 self._parse_args = parse_args
271
272 add_arguments_name = self._add_arguments.__name__
273 parse_args_name = self._parse_args.__name__
274 for test_func in [self.test_failures, self.test_successes]:
275 func_name = test_func.__name__
276 names = func_name, add_arguments_name, parse_args_name
277 test_name = '_'.join(names)
278
279 def wrapper(self, test_func=test_func):
280 test_func(self)
281 try:
282 wrapper.__name__ = test_name
283 except TypeError:
284 pass
285 setattr(tester_cls, test_name, wrapper)
286
287 def _get_parser(self, tester):
288 args = tester.parser_signature.args

Callers

nothing calls this directly

Calls 2

setattrFunction · 0.85
joinMethod · 0.45

Tested by

no test coverage detected