diff --git a/python/tests/tsdf_tests.py b/python/tests/tsdf_tests.py index 00567bf4..1f0a5756 100644 --- a/python/tests/tsdf_tests.py +++ b/python/tests/tsdf_tests.py @@ -869,7 +869,14 @@ def test_withPartitionCols(self): self.assertEqual(init_tsdf.partitionCols, []) self.assertEqual(actual_tsdf.partitionCols, ["symbol"]) - def test_tsdf_interpolate(self): ... + # def test_tsdf_interpolate(self): + # # TODO: wicked slow + # init_tsdf = self.get_test_df_builder("init").as_tsdf() + # expected_tsdf = self.get_test_df_builder("expected").as_tsdf() + # + # actual_tsdf = init_tsdf.interpolate("zero", "minute", "floor") + # + # self.assertDataFrameEquality(actual_tsdf, expected_tsdf) class FourierTransformTest(SparkTest): diff --git a/python/tests/unit_test_data/tsdf_tests.json b/python/tests/unit_test_data/tsdf_tests.json index 6d352fd8..0c4b7a28 100644 --- a/python/tests/unit_test_data/tsdf_tests.json +++ b/python/tests/unit_test_data/tsdf_tests.json @@ -1057,6 +1057,41 @@ } } } + }, + "test_tsdf_interpolate": { + "init": { + "tsdf": { + "ts_col": "event_ts" + }, + "df": { + "schema": "symbol string, event_ts string, trade_pr float", + "ts_convert": [ + "event_ts" + ], + "data": { + "$ref": "#/__SharedData/temp_slice_init_data/df/data" + } + } + }, + "expected": { + "tsdf": { + "ts_col": "event_ts" + }, + "df": { + "schema": "event_ts string, trade_pr float", + "ts_convert": [ + "event_ts" + ], + "data": [ + ["2020-09-01 00:20:38", 0.0], + ["2020-09-01 00:20:39", 0.0], + ["2020-09-01 00:20:40", 0.0], + ["2020-09-01 00:20:41", 0.0], + ["2020-09-01 00:20:42", 762.33] + ] + } + + } } }, "FourierTransformTest": {