Skip to content

Commit

Permalink
pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
justinpark committed Jan 7, 2025
1 parent 9ed7c4e commit caa2c39
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/unit_tests/databases/utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
from sqlalchemy.sql import sqltypes
from trino.sqlalchemy import datatype

from superset.databases.utils import make_url_safe, get_col_type
from superset.databases.utils import get_col_type, make_url_safe


def test_make_url_safe_string(session: Session) -> None:
"""
Expand All @@ -40,6 +41,7 @@ def test_make_url_safe_url(session: Session) -> None:
uri_safe = make_url_safe(uri)
assert uri_safe == uri


def test_get_col_type_primary(session: Session) -> None:
"""
Test getting a column type
Expand All @@ -53,6 +55,7 @@ def test_get_col_type_primary(session: Session) -> None:
}
assert get_col_type(col) == "INTEGER()"


def test_get_col_type_row_and_map(session: Session) -> None:
"""
Test getting a column type
Expand All @@ -61,12 +64,12 @@ def test_get_col_type_row_and_map(session: Session) -> None:
"name": "id",
"type": datatype.ROW(
[
('name', sqltypes.VARCHAR()),
('age', sqltypes.INTEGER()),
("name", sqltypes.VARCHAR()),
("age", sqltypes.INTEGER()),
]
),
"nullable": False,
"default": None,
"comment": None,
}
assert get_col_type(col) == "ROW([('name', VARCHAR()), ('age', INTEGER())])"
assert get_col_type(col) == "ROW([('name', VARCHAR()), ('age', INTEGER())])"

0 comments on commit caa2c39

Please sign in to comment.