def test_param_splitting():
 def check(src, result):
  grammar = load_grammar(('%s.%s' % sys.version_info[:2]))
  m = ParserWithRecovery(grammar, u(src)).module
  if is_py3:
   assert (not m.subscopes)
  else:
   assert ([str(param.name) for param in m.subscopes[0].params] == result)
 check('def x(a, (b, c)):\n pass', ['a'])
 check('def x((b, c)):\n pass', [])

def test_param_splitting ( ) : def check ( src , result ) : grammar = load_grammar ( ( '%s.%s' % sys . version_info [ : 2 ] ) ) m = ParserWithRecovery ( grammar , u ( src ) ) . module if is_py3 : assert ( not m . subscopes ) else : assert ( [ str ( param . name ) for param in m . subscopes [ 0 ] . params ] == result ) check ( 'def x(a, (b, c)):\n pass' , [ 'a' ] ) check ( 'def x((b, c)):\n pass' , [ ] )
jedi splits parameters into params .