(self)
| 2229 | setattr(namespace, self.dest, 'foo[%s]' % values) |
| 2230 | |
| 2231 | def test(self): |
| 2232 | |
| 2233 | parser = argparse.ArgumentParser() |
| 2234 | parser.register('action', 'my_action', self.MyAction) |
| 2235 | parser.add_argument('badger', action='my_action') |
| 2236 | |
| 2237 | self.assertEqual(parser.parse_args(['1']), NS(badger='foo[1]')) |
| 2238 | self.assertEqual(parser.parse_args(['42']), NS(badger='foo[42]')) |
| 2239 | |
| 2240 | |
| 2241 | class TestActionExtend(ParserTestCase): |
nothing calls this directly
no test coverage detected