MCPcopy Create free account
hub / github.com/EasyIME/PIME / test_setattr

Method test_setattr

python/python3/tornado/test/options_test.py:108–112  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

106 sys.stderr = orig_stderr
107
108 def test_setattr(self):
109 options = OptionParser()
110 options.define("foo", default=1, type=int)
111 options.foo = 2
112 self.assertEqual(options.foo, 2)
113
114 def test_setattr_type_check(self):
115 # setattr requires that options be the right type and doesn't

Callers

nothing calls this directly

Calls 2

defineMethod · 0.95
OptionParserClass · 0.90

Tested by

no test coverage detected