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

Method test_getfuncprops_print

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

Source from the content-addressed store, hash-verified

120
121 @unittest.skipIf(pypy, "pypy builtin signatures aren't complete")
122 def test_getfuncprops_print(self):
123 props = inspection.getfuncprops("print", print)
124
125 self.assertEqual(props.func, "print")
126 self.assertIn("end", props.argspec.kwonly)
127 self.assertIn("file", props.argspec.kwonly)
128 self.assertIn("flush", props.argspec.kwonly)
129 self.assertIn("sep", props.argspec.kwonly)
130 if _is_py311:
131 self.assertEqual(
132 repr(props.argspec.kwonly_defaults["file"]), "None"
133 )
134 else:
135 self.assertEqual(
136 repr(props.argspec.kwonly_defaults["file"]), "sys.stdout"
137 )
138 self.assertEqual(repr(props.argspec.kwonly_defaults["flush"]), "False")
139
140 @unittest.skipUnless(
141 numpy is not None and numpy.__version__ >= "1.18",

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected