This helper could factor more assertions such as 

```
+    assert_array_equal(np.tile(median, (y_learn.shape[0], 1)), y_pred_learn)
 +    assert_array_equal(np.tile(median, (y_test.shape[0], 1)), y_pred_test)
```

```
+    assert_array_equal(np.tile(constants, (y_learn.shape[0], 1)), y_pred_learn)
 +    assert_array_equal(np.tile(constants, (y_test.shape[0], 1)), y_pred_test)
```