MCPcopy Create free account
hub / github.com/bpython/bpython / test_parsekeywordpairs

Method test_parsekeywordpairs

bpython/test/test_inspection.py:52–60  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

50
51class TestInspection(unittest.TestCase):
52 def test_parsekeywordpairs(self):
53 # See issue #109
54 def fails(spam=["-a", "-b"]):
55 pass
56
57 argspec = inspection.getfuncprops("fails", fails)
58 self.assertIsNotNone(argspec)
59 defaults = argspec.argspec.defaults
60 self.assertEqual(str(defaults[0]), '["-a", "-b"]')
61
62 def test_pasekeywordpairs_string(self):
63 def spam(eggs="foo, bar"):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected