Skip to content

Commit

Permalink
simplify tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mengxr committed May 3, 2015
1 parent b7a7b9b commit d08f9cf
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions python/pyspark/ml/tuning.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,10 @@ class ParamGridBuilder(object):
{lr.regParam: 1.0, lr.featuresCol: 'f', lr.maxIter: 5, lr.labelCol: 'l', lr.predictionCol: 'p'}, \
{lr.regParam: 2.0, lr.featuresCol: 'f', lr.maxIter: 5, lr.labelCol: 'l', lr.predictionCol: 'p'}, \
{lr.regParam: 3.0, lr.featuresCol: 'f', lr.maxIter: 5, lr.labelCol: 'l', lr.predictionCol: 'p'}]
>>> fail_count = 0
>>> for e in expected:
... if e not in output:
... fail_count += 1
>>> if len(expected) != len(output):
... fail_count += 1
>>> fail_count
0
>>> len(output) == len(expected)
True
>>> all([m in expected for m in output])
True
"""

def __init__(self):
Expand Down

0 comments on commit d08f9cf

Please sign in to comment.