Exemple #1
0
 def test_multi(self):
     def example(state):
         return state
     state = 'test'
     c = callbacks.on_backward(callbacks.on_sample(callbacks.on_start(example)))
     self.assertTrue(c.on_backward(state) == state)
     self.assertTrue(c.on_sample(state) == state)
     self.assertTrue(c.on_start(state) == state)
Exemple #2
0
    def test_on_start(self):
        def example(state):
            return state

        state = 'test'
        self.assertTrue(callbacks.on_start(example).on_start(state) == state)
 def test_on_start(self):
     def example(state):
         return state
     state = 'test'
     self.assertTrue(callbacks.on_start(example).on_start(state) == state)