framework icon indicating copy to clipboard operation
framework copied to clipboard

SqlParser behavior is not correct with `Dialect(header=False)`

Open roll opened this issue 3 years ago • 0 comments

Overview

See this failing test:

def test_sql_parser_header_false(database_url):
    control = formats.SqlControl(table="table")
    dialect = Dialect(header=False, controls=[control])
    with Resource(database_url, dialect=dialect) as resource:
        assert resource.header.missing
        assert resource.read_rows() == [
            {"field1": None, "field2": "name"},
            {"field1": 1, "field2": "english"},
            {"field1": 2, "field2": "中国人"},
        ]

roll avatar Jul 30 '22 08:07 roll