Skip to content

Commit

Permalink
Add assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
yu-iskw committed Jul 17, 2015
1 parent a14939b commit be752de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public void fitAndTransform() {
List<String> columns = Arrays.asList(transformed.columns());
List<String> expectedColumns = Arrays.asList("features", "prediction");
for (String column: expectedColumns) {
columns.contains(column);
assertTrue(columns.contains(column));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class KMeansSuite extends SparkFunSuite with MLlibTestSparkContext {
val transformed = model.transform(dataset)
val expectedColumns = Array("features", predictionColName)
expectedColumns.foreach { column =>
transformed.columns.contains(column)
assert(transformed.columns.contains(column))
}
val clusters = transformed.select(predictionColName).map(_.getInt(0)).distinct().collect().toSet
assert(clusters.size === k)
Expand Down

0 comments on commit be752de

Please sign in to comment.