def test_with_block_does_not_save(self):
        state['a'] = 1
        self.assertEqual(len(state), 1)
        with tempfile.NamedTemporaryFile() as temp:
            state.save(temp.name)
            state.reset_instance()
            with StateHandler(temp.name):
                state['a'] = 42
            state.reset_instance()
            state.load(temp.name)
            self.assertEqual(state['a'], 1)
:param fn: The event handler function to be called.
dataset/ETHPy150Open duerrp/pyexperiment/tests/test_state.py/TestStateHandler.test_with_block_does_not_save--crossover with--dataset/ETHPy150Open crossbario/autobahn-python/autobahn/wamp/request.py/Handler.__init__