def test_has_classifications_empty(self) -> None: """ Test that has_classifications returns false when the internal map has either not been set or is an empty dictionary. """ e = MemoryClassificationElement('test', 0) e._c = None assert e.has_classifications() is False e._c = {} assert e.has_classifications() is False
def test_has_classification_nonempty(self) -> None: """ Test that has_classifications returns true when there is a valid internal map. """ e = MemoryClassificationElement('test', 0) e._c = {'a': 1, 'b': 0} assert e.has_classifications() is True