Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3c70e1b

Browse files
author
Jesse Whitehouse
committed
Move parameter tests into a dedicated class rather than a mixin
This will allow us to use pure pytest rather than blending pytest andunittest.test-caseNOTE: we should do this with all the mixins.Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>
1 parent9d88c51 commit3c70e1b

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

‎tests/e2e/common/parameterized_query_tests.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@
1515
calculate_decimal_cast_string,
1616
)
1717

18+
fromtests.e2e.test_driverimportPySQLTestCase
1819

1920
classMyCustomDecimalType(Enum):
2021
DECIMAL_38_0="DECIMAL(38,0)"
2122
DECIMAL_38_2="DECIMAL(38,2)"
2223
DECIMAL_18_9="DECIMAL(18,9)"
2324

2425

25-
classPySQLParameterizedQueryTestSuiteMixin:
26+
classPySqlParameterizedQueryTests(PySQLTestCase):
2627
"""Namespace for tests of server-side parameterized queries"""
2728

2829
QUERY="SELECT :p AS col"

‎tests/e2e/test_driver.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
fromtests.e2e.common.retry_test_mixinsimportClient429ResponseMixin,Client503ResponseMixin
2929
fromtests.e2e.common.staging_ingestion_testsimportPySQLStagingIngestionTestSuiteMixin
3030
fromtests.e2e.common.retry_test_mixinsimportPySQLRetryTestsMixin
31-
fromtests.e2e.common.parameterized_query_testsimportPySQLParameterizedQueryTestSuiteMixin
31+
3232
fromtests.e2e.common.uc_volume_testsimportPySQLUCVolumeTestSuiteMixin
3333

3434
log=logging.getLogger(__name__)
@@ -144,7 +144,7 @@ def test_cloud_fetch(self):
144144
# Exclude Retry tests because they require specific setups, and LargeQueries too slow for core
145145
# tests
146146
classPySQLCoreTestSuite(SmokeTestMixin,CoreTestMixin,DecimalTestsMixin,TimestampTestsMixin,
147-
PySQLTestCase,PySQLStagingIngestionTestSuiteMixin,PySQLRetryTestsMixin,PySQLParameterizedQueryTestSuiteMixin,PySQLUCVolumeTestSuiteMixin):
147+
PySQLTestCase,PySQLStagingIngestionTestSuiteMixin,PySQLRetryTestsMixin,PySQLUCVolumeTestSuiteMixin):
148148
validate_row_value_type=True
149149
validate_result=True
150150

@@ -701,6 +701,8 @@ def test_initial_namespace(self):
701701
self.assertEqual(cursor.fetchone()[0],table_name)
702702

703703

704+
fromtests.e2e.common.parameterized_query_testsimportPySqlParameterizedQueryTests
705+
704706
defmain(cli_args):
705707
globalget_args_from_env
706708
get_args_from_env=True

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp