def test_weirdCallable(self):
        us = WeirdCallableOptions()
        argV = "--foowrong blah".split()
        # ValueError is swallowed as UsageError
        e = self.assertRaises(usage.UsageError, us.parseOptions, argV)
        self.assertEquals(str(e), "Parameter type enforcement failed: Yay")

        us = WeirdCallableOptions()
        argV = "--barwrong blah".split()
        # RuntimeError is not swallowed
        self.assertRaises(RuntimeError, us.parseOptions, argV)
Test what happens when coerce functions raise errors.
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/test/test_usage.py/WrongTypedTestCase.test_weirdCallable