Skip to content

Commit 5ae389d

Browse files
style: apply ruff format to tests/test_dialects.py
1 parent 0836d20 commit 5ae389d

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

tests/test_dialects.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Standalone tests for json2sql dialects module."""
2+
23
import pytest
34

45
from json2sql.dialects import (
@@ -12,6 +13,7 @@
1213

1314
# --- Dialect enum ---
1415

16+
1517
class TestDialectEnum:
1618
"""Dialect enum values and membership."""
1719

@@ -30,12 +32,18 @@ def test_all_members(self):
3032

3133
# --- sql_type_for ---
3234

35+
3336
class TestSQLTypeFor:
3437
"""Python type → SQL type mapping per dialect."""
3538

36-
@pytest.mark.parametrize("dialect", [Dialect.POSTGRES, Dialect.MYSQL, Dialect.SQLITE])
39+
@pytest.mark.parametrize(
40+
"dialect", [Dialect.POSTGRES, Dialect.MYSQL, Dialect.SQLITE]
41+
)
3742
def test_string_type(self, dialect):
38-
assert "TEXT" in sql_type_for("hello", dialect).upper() or "VARCHAR" in sql_type_for("hello", dialect).upper()
43+
assert (
44+
"TEXT" in sql_type_for("hello", dialect).upper()
45+
or "VARCHAR" in sql_type_for("hello", dialect).upper()
46+
)
3947

4048
def test_postgres_int(self):
4149
assert sql_type_for(42, Dialect.POSTGRES) == "INTEGER"
@@ -83,6 +91,7 @@ def test_bool_before_int_check(self):
8391

8492
# --- quote_identifier ---
8593

94+
8695
class TestQuoteIdentifier:
8796
"""Identifier quoting per dialect."""
8897

@@ -109,6 +118,7 @@ def test_empty_name(self):
109118

110119
# --- format_value ---
111120

121+
112122
class TestFormatValue:
113123
"""Python value → SQL literal formatting."""
114124

@@ -161,6 +171,7 @@ def test_empty_string(self):
161171

162172
# --- create_table_sql ---
163173

174+
164175
class TestCreateTableSQL:
165176
"""CREATE TABLE statement generation."""
166177

@@ -195,6 +206,7 @@ def test_sqlite(self):
195206

196207
# --- insert_sql ---
197208

209+
198210
class TestInsertSQL:
199211
"""INSERT statement generation."""
200212

0 commit comments

Comments
 (0)