Skip to content

Commit f4b831b

Browse files
committed
Python assertions
1 parent b6bab56 commit f4b831b

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

ftplugin/python/switch.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ let b:switch_definitions =
77
\ g:switch_builtins.python_dict_get,
88
\ g:switch_builtins.python_string_style,
99
\ g:switch_builtins.python_dict_style,
10+
\ g:switch_builtins.python_asserts,
1011
\ ]

plugin/switch.vim

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,12 @@ let g:switch_builtins =
253253
\ '''\(\%([^''\\]\|\\.\)*\)''': '"\1"',
254254
\ 'f\@!"\(\%([^"\\]\|\\.\)*\)"': 'f"\1"',
255255
\ },
256+
\ 'python_asserts': {
257+
\ '\<assertTrue\>': 'assertFalse',
258+
\ '\<assertFalse\>': 'assertTrue',
259+
\ '\<assertIsNone\>': 'assertIsNotNone',
260+
\ '\<assertIsNotNone\>': 'assertIsNone',
261+
\ },
256262
\ }
257263

258264
let g:switch_definitions =

0 commit comments

Comments
 (0)