def test_optim_init(self): with pytest.raises(ValueError): Optimizer(0.1, None)
def test_init(self): Optimizer(0.5, params) with pytest.raises(ValueError): Optimizer(-0.5, params)
def test_construct(self): opt_2 = Optimizer(0.5, params) with pytest.raises(NotImplementedError): opt_2.construct()
def test_optim_init(self): with pytest.raises(TypeError): Optimizer(0.1, (1, 2, 3))