def test_invalidPortOption(self):
        options = widgetServiceMaker.options()
        options['element'] = DummyLiveElement()
        self.assertRaises(UsageError, options.parseOptions, ['--port', 'hello world'])
        self.assertRaises(UsageError, options.parseOptions, ['--port', '-7'])
        self.assertRaises(UsageError, options.parseOptions, ['--port', '70000'])
        self.assertRaises(UsageError, options.parseOptions, ['--port', '65536'])
Verify that non-integer and out-of-range port numbers are rejected.
dataset/ETHPy150Open twisted/nevow/nevow/test/test_athena.py/WidgetSubcommandTests.test_invalidPortOption