def test_set_performance_iterations_on_empty_config(self) -> None: """Test set_performance_iterations.""" config = Config() config.set_performance_iterations(1234) self.assertIsNone(config.evaluation)
def test_set_performance_iterations(self) -> None: """Test set_performance_iterations.""" config = Config(self.predefined_config) config.set_performance_iterations(1234) self.assertEqual(1234, config.evaluation.performance.iteration)
def test_set_performance_iterations_to_negative_value(self) -> None: """Test set_performance_iterations.""" config = Config(self.predefined_config) original_performance_iterations = config.evaluation.performance.iteration with self.assertRaises(ClientErrorException): config.set_performance_iterations(-1234) self.assertEqual(original_performance_iterations, config.evaluation.performance.iteration)