Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
Signed-off-by: Wenqi Li <[email protected]>
  • Loading branch information
wyli committed Oct 12, 2023
1 parent 87185e4 commit e0af817
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_handler_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@

class TestEvaluator(Evaluator):
def _iteration(self, engine, batchdata):
pass
engine.state.output = "called"
return engine.state.output


class TestHandlerValidation(unittest.TestCase):
Expand All @@ -44,6 +45,7 @@ def _train_func(engine, batch):
engine.run(data, max_epochs=1)
self.assertEqual(evaluator.state.max_epochs, 1)
self.assertEqual(evaluator.state.epoch_length, 8)
self.assertEqual(evaluator.state.output, "called")

engine.run(data, max_epochs=5)
self.assertEqual(evaluator.state.max_epochs, 4)
Expand Down

0 comments on commit e0af817

Please sign in to comment.