def test_invalid_solver(self, binary_lscp_pulp_problem, binary_coverage): p = Problem(binary_lscp_pulp_problem, binary_coverage, 'lscp') with pytest.raises(TypeError) as e: s = p.solve(None) assert ( e.value.args[0] == "Expected 'LpSolver' type for solver, got '<class 'NoneType'>'")
def test_solver(self, binary_lscp_pulp_problem, binary_coverage): p = Problem(binary_lscp_pulp_problem, binary_coverage, 'lscp') p = p.solve(GLPK()) assert (isinstance(p, Problem))