Skip to content

Commit

Permalink
Adding tests for failing sqllab data type
Browse files Browse the repository at this point in the history
  • Loading branch information
michellethomas committed Mar 16, 2018
1 parent cf8a72b commit 12caf65
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/sqllab_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,14 @@ def test_df_conversion_no_dict(self):
self.assertEquals(len(data), cdf.size)
self.assertEquals(len(cols), len(cdf.columns))

def test_df_conversion_tuple(self):
cols = [['string_col'], ['int_col'], ['list_col'], ['float_col']]
data = [(u'Text', 111, [123], 1.0)]
cdf = convert_results_to_df(cols, data)

self.assertEquals(len(data), cdf.size)
self.assertEquals(len(cols), len(cdf.columns))

def test_df_conversion_dict(self):
cols = [['string_col'], ['dict_col'], ['int_col']]
data = [['a', {'c1': 1, 'c2': 2, 'c3': 3}, 4]]
Expand Down

0 comments on commit 12caf65

Please sign in to comment.