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)
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()
def _is_kwargs(self, arg): return is_dict_assign(arg)