File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ def is_keyword(value):
5050 (r'(?<!\w)[$:?]\w+' , tokens .Name .Placeholder ),
5151
5252 (r'\\\w+' , tokens .Command ),
53- ( r'(NOT\s+)?(IN)\b' , tokens . Operator . Comparison ),
53+
5454 # FIXME(andi): VALUES shouldn't be listed here
5555 # see https://github.com/andialbrecht/sqlparse/pull/64
5656 # AS and IN are special, it may be followed by a parenthesis, but
Original file line number Diff line number Diff line change @@ -376,20 +376,10 @@ def test_grouping_function_not_in():
376376 # issue183
377377 p = sqlparse .parse ('in(1, 2)' )[0 ]
378378 assert len (p .tokens ) == 2
379- assert p .tokens [0 ].ttype == T .Comparison
379+ assert p .tokens [0 ].ttype == T .Keyword
380380 assert isinstance (p .tokens [1 ], sql .Parenthesis )
381381
382382
383- def test_in_comparison ():
384- # issue566
385- p = sqlparse .parse ('a in (1, 2)' )[0 ]
386- assert len (p .tokens ) == 1
387- assert isinstance (p .tokens [0 ], sql .Comparison )
388- assert len (p .tokens [0 ].tokens ) == 5
389- assert p .tokens [0 ].left .value == 'a'
390- assert p .tokens [0 ].right .value == '(1, 2)'
391-
392-
393383def test_grouping_varchar ():
394384 p = sqlparse .parse ('"text" Varchar(50) NOT NULL' )[0 ]
395385 assert isinstance (p .tokens [2 ], sql .Function )
You can’t perform that action at this time.
0 commit comments