def test_set_performance_warmup_on_empty_config(self) -> None: """Test set_performance_warmup.""" config = Config() config.set_performance_warmup(1234) self.assertIsNone(config.evaluation)
def test_set_performance_warmup(self) -> None: """Test set_performance_warmup.""" config = Config(self.predefined_config) config.set_performance_warmup(1234) self.assertEqual(1234, config.evaluation.performance.warmup)
def test_set_performance_warmup_to_negative_value(self) -> None: """Test set_performance_warmup.""" config = Config(self.predefined_config) original_performance_warmup = config.evaluation.performance.warmup with self.assertRaises(ClientErrorException): config.set_performance_warmup(-1234) self.assertEqual(original_performance_warmup, config.evaluation.performance.warmup)