def test_3_ensure_va_kwa(self):
    a = A()
    try:
      assert a.hello(1,2,3,4,5,*('extra va1','extra va2')) == 0, 'should throw TypeError'
    except __HOLE__:
      pass
    a.hello = introspect.ensure_va_kwa(a.hello)
    expected = self.expect_hello_info.copy()
    expected['varargs'] = True
    expected['varkw'] = True
    returned = introspect.callable_info(a.hello)
    assert returned == expected, '%s\n!=\n%s' % (returned, expected)
    assert a.hello(1,2,3,4,5, *('va1','va2'), **{'kw1':1, 'kw2':2}) == {
      'self': a,
      'one': 1,
      'two': 14,
      'three': 3,
      'four': 4,
      'five': 5,
      'foo':'oof',
      'bar':'rab',
      'baz':'f'
    }
    assert a.hello('ett', 'tva') == {
      'self': a,
      'one': 'ett',
      'two': 14,
      'three': None,
      'four': 123,
      'five': 'internets',
      'foo':'oof',
      'bar':'rab',
      'baz':'f'
    }
    # This should not raise an exception
    a.none = introspect.ensure_va_kwa(a.none)
    a.none()
    a.none(1,2)
    a.none(1,2,3,4)
    a.none(1,2,3,4,foo=12)
dataset/ETHPy150Open rsms/smisk/lib/smisk/test/util/introspect.py/IntrospectTests.test_3_ensure_va_kwa