Skip to content

Commit

Permalink
#291 Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
hakancelikdev committed Nov 17, 2023
1 parent 51a2465 commit 98f4046
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/cases/analyzer/statement/match_statement.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from typing import List, Union

from unimport.statement import Import, ImportFrom, Name

__all__ = ["NAMES", "IMPORTS", "UNUSED_IMPORTS"]


NAMES: List[Name] = [
Name(lineno=3, name='sort_by', is_all=False),
Name(lineno=4, name='sort_by', is_all=False),
Name(lineno=5, name='sort_by', is_all=False),
]
IMPORTS: List[Union[Import, ImportFrom]] = [
]
UNUSED_IMPORTS: List[Union[Import, ImportFrom]] = [

]
5 changes: 5 additions & 0 deletions tests/cases/refactor/statement/match_statement.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# https://github.com/hakancelikdev/unimport/issues/291

match sort_by:
case 'date': sort_by = ' updated DESC,'
case _: sort_by = ''
5 changes: 5 additions & 0 deletions tests/cases/source/statement/match_statement.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# https://github.com/hakancelikdev/unimport/issues/291

match sort_by:
case 'date': sort_by = ' updated DESC,'
case _: sort_by = ''

0 comments on commit 98f4046

Please sign in to comment.