def test_dt_output_shape(dummy_titanic): X_train, y_train, X_test, y_test = dummy_titanic dt = DecisionTree() dt.fit(X_train, y_train) pred_train = dt.predict(X_train) pred_test = dt.predict(X_test) assert pred_train.shape == (X_train.shape[0],), 'DecisionTree output should be same as training labels.' assert pred_test.shape == (X_test.shape[0],), 'DecisionTree output should be same as testing labels.'