diff options
Diffstat (limited to 'tests/dataframe/unit/dataframe_test_base.py')
-rw-r--r-- | tests/dataframe/unit/dataframe_test_base.py | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/tests/dataframe/unit/dataframe_test_base.py b/tests/dataframe/unit/dataframe_test_base.py deleted file mode 100644 index 6b07df9..0000000 --- a/tests/dataframe/unit/dataframe_test_base.py +++ /dev/null @@ -1,23 +0,0 @@ -import typing as t -import unittest - -import sqlglot -from sqlglot import MappingSchema -from sqlglot.dataframe.sql import SparkSession -from sqlglot.dataframe.sql.dataframe import DataFrame -from sqlglot.helper import ensure_list - - -class DataFrameTestBase(unittest.TestCase): - def setUp(self) -> None: - sqlglot.schema = MappingSchema() - SparkSession._instance = None - - def compare_sql( - self, df: DataFrame, expected_statements: t.Union[str, t.List[str]], pretty=False - ): - actual_sqls = df.sql(pretty=pretty) - expected_statements = ensure_list(expected_statements) - self.assertEqual(len(expected_statements), len(actual_sqls)) - for expected, actual in zip(expected_statements, actual_sqls): - self.assertEqual(expected, actual) |