def test_assign_infeasible(solver):
    """Tests that minimum-cost solution with most edges is found."""
    costs = np.asfarray([[np.nan, np.nan, 2],
                         [np.nan, np.nan, 1],
                         [8, 7, 4]])
    costs_copy = costs.copy()
    result = lap.linear_sum_assignment(costs, solver=solver)

    # Optimal matching is (1, 2), (2, 1).
    expected = np.array([[1, 2], [2, 1]])
    np.testing.assert_equal(result, expected)
    np.testing.assert_equal(costs, costs_copy)
Tests that minimum-cost solution with most edges is found.
motmetrics/tests/test_lap.py