11"""Standalone tests for json2sql dialects module."""
2+
23import pytest
34
45from json2sql .dialects import (
1213
1314# --- Dialect enum ---
1415
16+
1517class TestDialectEnum :
1618 """Dialect enum values and membership."""
1719
@@ -30,12 +32,18 @@ def test_all_members(self):
3032
3133# --- sql_type_for ---
3234
35+
3336class 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+
8695class TestQuoteIdentifier :
8796 """Identifier quoting per dialect."""
8897
@@ -109,6 +118,7 @@ def test_empty_name(self):
109118
110119# --- format_value ---
111120
121+
112122class TestFormatValue :
113123 """Python value → SQL literal formatting."""
114124
@@ -161,6 +171,7 @@ def test_empty_string(self):
161171
162172# --- create_table_sql ---
163173
174+
164175class TestCreateTableSQL :
165176 """CREATE TABLE statement generation."""
166177
@@ -195,6 +206,7 @@ def test_sqlite(self):
195206
196207# --- insert_sql ---
197208
209+
198210class TestInsertSQL :
199211 """INSERT statement generation."""
200212
0 commit comments