Skip to content

Commit e067f2d

Browse files
committed
Fixed tests
1 parent 8457cb9 commit e067f2d

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

tests/e2e/test_complex_types.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def table_fixture(self, connection_details):
1414
# Create the table
1515
cursor.execute(
1616
"""
17-
CREATE TABLE IF NOT EXISTS pysql_test_complex_types_table (
17+
CREATE TABLE IF NOT EXISTS pysql_test_complex_types_table_deprecated (
1818
array_col ARRAY<STRING>,
1919
map_col MAP<STRING, INTEGER>,
2020
struct_col STRUCT<field1: STRING, field2: INTEGER>
@@ -24,7 +24,7 @@ def table_fixture(self, connection_details):
2424
# Insert a record
2525
cursor.execute(
2626
"""
27-
INSERT INTO pysql_test_complex_types_table
27+
INSERT INTO pysql_test_complex_types_table_deprecated
2828
VALUES (
2929
ARRAY('a', 'b', 'c'),
3030
MAP('a', 1, 'b', 2, 'c', 3),
@@ -34,7 +34,7 @@ def table_fixture(self, connection_details):
3434
)
3535
yield
3636
# Clean up the table after the test
37-
cursor.execute("DROP TABLE IF EXISTS pysql_test_complex_types_table")
37+
cursor.execute("DROP TABLE IF EXISTS pysql_test_complex_types_table_deprecated")
3838

3939
@pytest.mark.parametrize(
4040
"field,expected_type",
@@ -45,7 +45,7 @@ def test_read_complex_types_as_arrow(self, field, expected_type, table_fixture):
4545

4646
with self.cursor() as cursor:
4747
result = cursor.execute(
48-
"SELECT * FROM pysql_test_complex_types_table LIMIT 1"
48+
"SELECT * FROM pysql_test_complex_types_table_deprecated LIMIT 1"
4949
).fetchone()
5050

5151
assert isinstance(result[field], expected_type)
@@ -57,7 +57,7 @@ def test_read_complex_types_as_string(self, field, table_fixture):
5757
extra_params={"_use_arrow_native_complex_types": False}
5858
) as cursor:
5959
result = cursor.execute(
60-
"SELECT * FROM pysql_test_complex_types_table LIMIT 1"
60+
"SELECT * FROM pysql_test_complex_types_table_deprecated LIMIT 1"
6161
).fetchone()
6262

6363
assert isinstance(result[field], str)

tests/e2e/test_parameterized_queries.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def inline_table(self, connection_details):
123123
"""
124124

125125
query = """
126-
CREATE TABLE IF NOT EXISTS pysql_e2e_inline_param_test_table (
126+
CREATE TABLE IF NOT EXISTS pysql_e2e_inline_param_test_table_deprecated (
127127
null_col INT,
128128
int_col INT,
129129
bigint_col BIGINT,
@@ -167,9 +167,9 @@ def _inline_roundtrip(self, params: dict, paramstyle: ParamStyle):
167167
This is a no-op but is included to make the test-code easier to read.
168168
"""
169169
target_column = self._get_inline_table_column(params.get("p"))
170-
INSERT_QUERY = f"INSERT INTO pysql_e2e_inline_param_test_table (`{target_column}`) VALUES (%(p)s)"
171-
SELECT_QUERY = f"SELECT {target_column} `col` FROM pysql_e2e_inline_param_test_table LIMIT 1"
172-
DELETE_QUERY = "DELETE FROM pysql_e2e_inline_param_test_table"
170+
INSERT_QUERY = f"INSERT INTO pysql_e2e_inline_param_test_table_deprecated (`{target_column}`) VALUES (%(p)s)"
171+
SELECT_QUERY = f"SELECT {target_column} `col` FROM pysql_e2e_inline_param_test_table_deprecated LIMIT 1"
172+
DELETE_QUERY = "DELETE FROM pysql_e2e_inline_param_test_table_deprecated"
173173

174174
with self.connection(extra_params={"use_inline_params": True}) as conn:
175175
with conn.cursor() as cursor:

0 commit comments

Comments
 (0)