def test_setdefault(self):
        # Test retrieving an existing value
        cb = Callback(self)
        foo = MyClass(cb)
        self.assertEqual(foo.d.setdefault("a", "dummy"), "apple")
        self.assertFalse(cb.called)

        # Test adding a new value
        cb = Callback(self, added={"f": "fig"})
        bar = MyClass(cb)
        self.assertTrue(bar.d.setdefault("f", "fig") is "fig")
        self.assertTrue(cb.called)
        return
dataset/ETHPy150Open enthought/traits/traits/tests/test_container_events.py/DictEventTestCase.test_setdefault/operator `==` -> `is`