예제 #1
0
 def test_is_dict_assign(self):
     for ok in DICTS:
         assert is_dict_assign(ok)
         assert is_dict_assign(ok + '=', allow_assign_mark=True)
         assert is_dict_assign(ok + ' =', allow_assign_mark=True)
         assert not is_dict_assign(ok + '[item]')
         assert not is_dict_assign(' ' + ok)
     for nok in NOK_ASSIGNS + SCALARS + LISTS:
         assert not is_dict_assign(nok)
예제 #2
0
 def test_is_dict_assign(self):
     for ok in DICTS:
         assert is_dict_assign(ok)
         assert search_variable(ok).is_dict_assign()
         assert is_dict_assign(ok + '=', allow_assign_mark=True)
         assert is_dict_assign(ok + ' =', allow_assign_mark=True)
         assert not is_dict_assign(ok + '[item]')
         assert not is_dict_assign(' ' + ok)
     for nok in NOK_ASSIGNS + SCALARS + LISTS:
         assert not is_dict_assign(nok)
         assert not search_variable(nok, ignore_errors=True).is_dict_assign()
예제 #3
0
 def _is_kwargs(self, arg):
     return is_dict_assign(arg)