def METHOD_NAME(pName, problem, solver, writer, kwds):
    def Method(obj):
        if not testing_solvers[solver, writer]:
            obj.skipTest("Solver %s (interface=%s) is not available" % (solver, writer))
        m = import_file(
            os.path.join(thisDir, 'problems', problem + '.py'), clear_cache=True
        )
        model = m.define_model(**kwds)
        opt = pyomo.opt.SolverFactory(solver, solver_io=writer)
        results = opt.solve(model)
        # non-recursive
        new_results = (
            (var.name, var.value)
            for var in model.component_data_objects(
                Var, active=True, descend_into=False
            )
        )
        baseline_results = getattr(obj, problem + '_results')
        for name, value in new_results:
            if abs(baseline_results[name] - value) > 0.0001:
                raise IOError(
                    "Difference in baseline solution values and "
                    "current solution values using:\n"
                    + "Solver: "
                    + solver
                    + "\n"
                    + "Writer: "
                    + writer
                    + "\n"
                    + "Variable: "
                    + name
                    + "\n"
                    + "Solution: "
                    + str(value)
                    + "\n"
                    + "Baseline: "
                    + str(baseline_results[name])
                    + "\n"
                )
    return Method