        sm.send("swap")
        sm.send("leave")
>       assert sm.captured["exit_child_b"] == {"shared": "parent", "parent_only": 1}
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
E       KeyError: 'exit_child_b'

tests/test_state_data.py:356: KeyError
_________________ TestPickle.test_history_data_survives_pickle _________________

self = <tests.test_state_data.TestPickle object at 0x7fdde5d2acc0>

    def test_history_data_survives_pickle(self):
        sm = DeepDataHistory()
        sm.set_state_data("phase", "p", 99)
        sm.send("pause")
    
>       clone = pickle.loads(pickle.dumps(sm))
                             ^^^^^^^^^^^^^^^^
E       TypeError: cannot pickle 'weakref.ReferenceType' object

tests/test_state_data.py:569: TypeError
=========================== short test summary info ============================
FAILED tests/test_state_data.py::TestHierarchicalScoping::test_data_persists_through_parent_on_exit
FAILED tests/test_state_data.py::TestPickle::test_history_data_survives_pickle
2 failed, 49 passed in 0.14s
