def test_result_equality():
     nn_opt = NearestNeighborsOpt(schema)
     nn_not_opt = NearestNeighborsNotOpt(schema)
     recoms_opt = nn_opt.get_recom_info(5)
     recoms_not_opt = nn_not_opt.get_recoms_info(5)
     np.testing.assert_array_equal(recoms_opt, recoms_not_opt,
                                   "Results are not equal.")
def test_get_recom_info():
     my_problem = NearestNeighborsOpt(schema)
     result = my_problem.get_recom_info(5)
     expected = np.array([[2, 0, 1, 1, 1, 3, 2, 2],
                          [1, 0, 2, 0, 1, 2, 1, 3],
                          [1, 1, 1, 0, 1, 1, 3, 3],
                          [2, 0, 2, 1, 0, 4, 1, 3],
                          [1, 1, 1, 0, 1, 1, 3, 3],
                          [2, 0, 1, 1, 1, 3, 2, 2],
                          [1, 0, 3, 0, 1, 2, 1, 2],
                          [1, 1, 1, 0, 0, 2, 2, 4],
                          [3, 1, 5, 1, 1, 4, 3, 5],
                          [0, 1, 1, 0, 1, 2, 3, 3]])
     np.testing.assert_array_equal(result, expected, "Fail : get_recom_info")