def test_defaults(self): step = SparkStep(spark=spark_func) self.assertEqual(step.spark, spark_func) self.assertEqual(step.spark_args, []) self.assertEqual( step.description(0), dict(type='spark', jobconf={}, spark_args=[]), )
def test_all_args(self): step = SparkStep(spark=spark_func, spark_args=['argh', 'argh']) self.assertEqual(step.spark, spark_func) self.assertEqual(step.spark_args, ['argh', 'argh']) self.assertEqual( step.description(0), dict(type='spark', spark_args=['argh', 'argh']), )
def test_positional_spark_arg(self): step1 = SparkStep(spark_func) step2 = SparkStep(spark=spark_func) self.assertEqual(step1, step2) self.assertEqual(step1.description(0), step2.description(0))