Test that for a given Table representation, both the Impala and PostgreSQL cursor objects generate valid SQL for creating their tables.
(unittest_cursor_map, table_data)
| 108 | storage_format='KUDU')}, |
| 109 | ]) |
| 110 | def test_make_create_table_sql(unittest_cursor_map, table_data): |
| 111 | """ |
| 112 | Test that for a given Table representation, both the Impala and PostgreSQL cursor |
| 113 | objects generate valid SQL for creating their tables. |
| 114 | """ |
| 115 | which_sql = table_data['descr'] |
| 116 | table_object = table_data['data'] |
| 117 | expected_sql = unittest_cursor_map['sql'][which_sql] |
| 118 | cursor = unittest_cursor_map['cursor'] |
| 119 | assert expected_sql == cursor.make_create_table_sql(table_object) |
| 120 | |
| 121 | |
| 122 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected