def test_non_null(self, k, v): """ AD is sensitive to value updates """ ad = AttMap() assert not ad.is_null(k) and not ad.non_null(k) ad[k] = None assert ad.is_null(k) and not ad.non_null(k) ad[k] = v assert not ad.is_null(k) and ad.non_null(k)
def test_is_null(self, item): """ Null-valued key/item evaluates as such. """ ad = AttMap() ad[item] = None assert ad.is_null(item) and not ad.non_null(item)
def test_missing_is_neither_null_nor_non_null(self, item): """ Value of absent key is neither null nor non-null """ ad = AttMap() assert not ad.is_null(item) and not ad.non_null(item)