def test_invalid_action(self):
        self.assertValueError('-x', action='foo')
        self.assertValueError('foo', action='baz')
        self.assertValueError('--foo', action=('store', 'append'))
        parser = argparse.ArgumentParser()
        try:
            parser.add_argument("--foo", action="store-true")
        except ValueError:
            e = sys.exc_info()[1]
            expected = 'unknown action'
            msg = 'expected %r, found %r' % (expected, e)
            self.assertTrue(expected in str(e), msg)
dataset/ETHPy150Open amrdraz/kodr/app/brython/www/src/Lib/test/test_argparse.py/TestInvalidArgumentConstructors.test_invalid_action/original