• Home
  • Raw
  • Download

Lines Matching full:signature

16     def signature(func):  member in TestSignatureObject
17 sig = inspect.signature(func)
35 S = inspect.Signature
42 sig = inspect.signature(test)
71 sig = inspect.signature(test)
86 self.assertEqual(self.signature(test), ((), Ellipsis))
93 self.assertEqual(self.signature(test),
104 self.assertEqual(self.signature(test),
115 self.assertEqual(self.signature(test),
126 with self.assertRaisesRegex(ValueError, 'not supported by signature'):
127 inspect.signature(type)
128 with self.assertRaisesRegex(ValueError, 'not supported by signature'):
130 inspect.signature(type.__call__)
132 raise ValueError('not supported by signature')
133 with self.assertRaisesRegex(ValueError, 'not supported by signature'):
135 inspect.signature(min.__call__)
137 raise ValueError('not supported by signature')
139 'no signature found for builtin function'):
141 inspect.signature(min)
145 inspect.signature(42)
148 inspect.Signature.from_function(42)
159 self.assertEqual(self.signature(meth),
174 self.assertEqual(self.signature(meth),
180 self.assertEqual(self.signature(meth),
195 self.assertEqual(self.signature(meth),
201 self.assertEqual(self.signature(meth),
215 self.assertEqual(self.signature(partial(test)), ((), Ellipsis))
218 inspect.signature(partial(test, 1))
221 inspect.signature(partial(test, a=1))
226 self.assertEqual(self.signature(partial(test)),
233 self.assertEqual(self.signature(partial(test, 1)),
239 self.assertEqual(self.signature(partial(test, 1, c=2)),
245 self.assertEqual(self.signature(partial(test, b=1, c=2)),
252 self.assertEqual(self.signature(partial(test, 0, b=1, c=2)),
261 self.assertEqual(self.signature(partial(test, 1)),
267 self.assertEqual(self.signature(partial(test, 1, 2, 3)),
274 self.assertEqual(self.signature(partial(test, 1, 2, 3, test=True)),
280 self.assertEqual(self.signature(partial(test, 1, 2, 3, test=1, b=0)),
286 self.assertEqual(self.signature(partial(test, b=0)),
293 self.assertEqual(self.signature(partial(test, b=0, test=1)),
303 sig = test.__signature__ = inspect.signature(test)
305 self.assertEqual(self.signature(partial(partial(test, 1))),
310 self.assertEqual(self.signature(partial(partial(test, 1), 2)),
314 psig = inspect.signature(partial(partial(test, 1), 2))
319 self.assertEqual(self.signature(_foo),
322 # check that we don't have any side-effects in signature(),
329 self.assertEqual(self.signature(_foo),
337 inspect.signature(_foo)
342 self.assertEqual(self.signature(_foo),
348 ba = inspect.signature(_foo).bind(a=200, b=11)
354 ba = inspect.signature(_foo).bind(11)
356 ba = inspect.signature(_foo).bind(11, 12)
358 ba = inspect.signature(_foo).bind(11, b=12)
360 ba = inspect.signature(_foo).bind(b=12)
363 ba = inspect.signature(_foo).bind(12, 14)
383 self.assertEqual(self.signature(Foo.bar),
389 self.assertEqual(self.signature(Foo().bar),
399 sig = inspect.signature(func)
409 self.assertEqual(self.signature(Foo.__call__),
414 self.assertEqual(self.signature(Foo().__call__),
426 self.assertEqual(self.signature(C),
437 self.assertEqual(self.signature(C),
448 self.assertEqual(self.signature(C),
452 self.assertEqual(self.signature(CM),
471 self.assertEqual(self.signature(CMM),
478 self.assertEqual(self.signature(CM),
484 self.assertEqual(self.signature(C),
495 self.assertEqual(self.signature(CM),
508 self.assertEqual(self.signature(Foo()),
515 inspect.signature(Spam())
520 self.assertEqual(self.signature(Bar()),
526 with self.assertRaisesRegex(ValueError, "not supported by signature"):
527 inspect.signature(ToFail())
535 self.assertEqual(self.signature(Wrapped),
540 self.assertEqual(self.signature((lambda a=10: a)),
548 self.assertNotEqual(inspect.signature(foo), 42)
551 self.assertEqual(inspect.signature(foo), inspect.signature(bar))
554 self.assertNotEqual(inspect.signature(foo), inspect.signature(bar))
557 self.assertNotEqual(inspect.signature(foo), inspect.signature(bar))
560 self.assertNotEqual(inspect.signature(foo), inspect.signature(bar))
563 self.assertNotEqual(inspect.signature(foo), inspect.signature(bar))
566 self.assertNotEqual(inspect.signature(foo), inspect.signature(bar))
568 self.assertNotEqual(inspect.signature(spam), inspect.signature(bar))
572 self.assertEqual(inspect.signature(foo), inspect.signature(bar))
576 self.assertEqual(inspect.signature(foo), inspect.signature(bar))
580 self.assertEqual(inspect.signature(foo), inspect.signature(bar))
584 self.assertNotEqual(inspect.signature(foo), inspect.signature(bar))
588 self.assertEqual(inspect.signature(foo), inspect.signature(bar))
593 sig = inspect.signature(foo)
603 self.assertEqual(str(inspect.signature(foo)),
608 self.assertEqual(str(inspect.signature(foo)),
613 self.assertEqual(str(inspect.signature(foo)), '()')
624 sig = inspect.signature(test)
629 self.assertEqual(str(inspect.signature(test)),
632 sig = inspect.signature(test)
636 self.assertEqual(str(inspect.signature(test)),
646 sig = inspect.signature(test)
653 self.assertEqual(sig, inspect.signature(test))
779 sig = inspect.signature(func)
948 sig = inspect.signature(test)
968 sig = inspect.signature(test)
995 ba = inspect.signature(foo).bind(1)
1002 ba = inspect.signature(foo).bind(1)
1005 ba2 = inspect.signature(foo).bind(1)
1008 ba3 = inspect.signature(foo).bind(2)
1014 ba4 = inspect.signature(bar).bind(1)