Beispiel #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)
Beispiel #2
0
    def test_on_sample(self):
        def example(state):
            return state

        state = 'test'
        self.assertTrue(callbacks.on_sample(example).on_sample(state) == state)
 def test_on_sample(self):
     def example(state):
         return state
     state = 'test'
     self.assertTrue(callbacks.on_sample(example).on_sample(state) == state)