def test_simple(self):
        class Test(HasTraits):
            i = Int

        # Create objects
        obj = Test()
        target = HasTraits()

        # Set up to count changes in i
        self.count = 0

        def count_notifies():
            self.count += 1
        obj.on_trait_change(count_notifies, "i", target=target)

        # Change the trait
        obj.i = 10
        # Delete the target and change it again
        del target
        obj.i = 0
        # The count should be 1
        self.assertEqual(self.count, 1)
returns an enhanced dictionary
dataset/ETHPy150Open enthought/traits/traits/tests/test_target.py/TestCase.test_simple--crossover with--dataset/ETHPy150Open StartTheShift/thunderdome/thunderdome/containers.py/Table.__getitem__