Skip to content

Pin MSSQL package versions #336

Pin MSSQL package versions

Pin MSSQL package versions #336

GitHub Actions / Test Results failed Dec 27, 2023 in 0s

3 fail, 38 skipped, 199 pass in 5m 38s

βŸβ€„βŸβ€„4 filesβ€„β€ƒβŸβ€„βŸβ€„4 suites   5m 38s ⏱️
240 tests 199 βœ”οΈβ€ƒ38 πŸ’€β€ƒ3 ❌
246 runs  205 βœ”οΈβ€ƒ38 πŸ’€β€ƒ3 ❌

Results for commit f164dc7.

Annotations

Check failure on line 0 in dl_connector_mssql_tests.db.api.test_dashsql.TestMSSQLDashSQL

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_result (dl_connector_mssql_tests.db.api.test_dashsql.TestMSSQLDashSQL) failed

./report/pytest_reports_dl_connector_mssql_333391992/_src_lib_dl_connector_mssql_dl_connector_mssql_tests-db-3762e660a365495f96d1f30b7bb4c9a0.xml [took 2s]
Raw output
AssertionError: assert ['int', 'int'... 'float', ...] == ['int', 'int'... 'float', ...]
  At index 16 diff: 'date' != 'str'
  Full diff:
    [
     'int',
     'int',
     'int',
     'int',
     'int',
     'float',
     'float',
     'decimal',
     'decimal',
     'bool',
     'str',
     'str',
     'str',
     'str',
     'str',
     'str',
  -  'str',
  +  'date',
     'datetime',
  -  'str',
  +  'datetime',
     'datetime',
     'str',
     'str',
    ]
self = <dl_connector_mssql_tests.db.api.test_dashsql.TestMSSQLDashSQL object at 0x7f4fe6ad2aa0>
data_api_lowlevel_aiohttp_client = <aiohttp.test_utils.TestClient object at 0x7f4fd5494190>
saved_connection_id = 'vk00dy8wezmyj'

    @pytest.mark.asyncio
    async def test_result(self, data_api_lowlevel_aiohttp_client: TestClient, saved_connection_id: str):
        print("check")
        resp = await self.get_dashsql_response(
            data_api_aio=data_api_lowlevel_aiohttp_client,
            conn_id=saved_connection_id,
            query=SUBSELECT_QUERY_FULL,
        )
    
        resp_data = await resp.json()
        assert resp_data[0]["event"] == "metadata", resp_data
        assert resp_data[0]["data"]["names"] == [
            "number",
            "num_tinyint",
            "num_smallint",
            "num_integer",
            "num_bigint",
            "num_float",
            "num_real",
            "num_numeric",
            "num_decimal",
            "num_bit",
            "num_char",
            "num_varchar",
            "num_text",
            "num_nchar",
            "num_nvarchar",
            "num_ntext",
            "num_date",
            "num_datetime",
            "num_datetime2",
            "num_smalldatetime",
            "num_datetimeoffset",
            "uuid",
        ]
>       assert resp_data[0]["data"]["driver_types"] == [
            "int",
            "int",
            "int",
            "int",
            "int",
            "float",
            "float",
            "decimal",
            "decimal",
            "bool",
            "str",
            "str",
            "str",
            "str",
            "str",
            "str",
            "str",
            "datetime",
            "str",
            "datetime",
            "str",
            "str",
        ]
E       AssertionError: assert ['int', 'int'... 'float', ...] == ['int', 'int'... 'float', ...]
E         At index 16 diff: 'date' != 'str'
E         Full diff:
E           [
E            'int',
E            'int',
E            'int',
E            'int',
E            'int',
E            'float',
E            'float',
E            'decimal',
E            'decimal',
E            'bool',
E            'str',
E            'str',
E            'str',
E            'str',
E            'str',
E            'str',
E         -  'str',
E         +  'date',
E            'datetime',
E         -  'str',
E         +  'datetime',
E            'datetime',
E            'str',
E            'str',
E           ]

db/api/test_dashsql.py:46: AssertionError

Check failure on line 0 in dl_connector_mssql_tests.db.core.test_data_source.TestMSSQLSubselectDataSource

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_get_raw_schema (dl_connector_mssql_tests.db.core.test_data_source.TestMSSQLSubselectDataSource) failed

./report/pytest_reports_dl_connector_mssql_333391992/_src_lib_dl_connector_mssql_dl_connector_mssql_tests-db-3762e660a365495f96d1f30b7bb4c9a0.xml [took 0s]
Raw output
AssertionError: expected=('order_date', <UserDataType.string: 1>) actual=('order_date', <UserDataType.date: 4>)
self = <dl_connector_mssql_tests.db.core.test_data_source.TestMSSQLSubselectDataSource object at 0x7f4fe68636a0>
data_source = MSSQLSubselectDataSource(_id='ced80a36d09e476bafb2ae683aa4eb27', _us_entry_buffer=USEntryBuffer(_data={}), _spec=Subse...or_mssql.core.us_connection.ConnectionMSSQL object at 0x7f4fd655a890>, _cache_enabled=True, _exists=None, _subsql=None)
sync_conn_executor_factory = <function BaseConnectionTestClass.sync_conn_executor_factory.<locals>.factory at 0x7f4fd4b7b910>

    def test_get_raw_schema(
        self,
        data_source: _DSRC_TV,
        sync_conn_executor_factory: Callable[[], SyncConnExecutorBase],
    ) -> None:
        raw_schema = data_source.get_schema_info(conn_executor_factory=sync_conn_executor_factory).schema
        simplified_schema = [(col.title, col.user_type) for col in raw_schema]
        expected_schema = self.get_expected_simplified_schema()
        print("schema:")
        for col in simplified_schema:
            print(col)
        assert len(simplified_schema) == len(expected_schema)
        for actual, expected in zip(simplified_schema, expected_schema):
>           assert actual == expected, f"{expected=} {actual=}"
E           AssertionError: expected=('order_date', <UserDataType.string: 1>) actual=('order_date', <UserDataType.date: 4>)

/venv/lib/python3.10/site-packages/dl_core_testing/testcases/data_source.py:108: AssertionError

Check failure on line 0 in dl_connector_mssql_tests.db.core.test_data_source.TestMSSQLSubselectByView

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_view_from_subselect (dl_connector_mssql_tests.db.core.test_data_source.TestMSSQLSubselectByView) failed

./report/pytest_reports_dl_connector_mssql_333391992/_src_lib_dl_connector_mssql_dl_connector_mssql_tests-db-3762e660a365495f96d1f30b7bb4c9a0.xml [took 0s]
Raw output
AssertionError
self = <dl_connector_mssql_tests.db.core.test_data_source.TestMSSQLSubselectByView object at 0x7f4fe687c670>
data_source = MSSQLSubselectDataSource(_id='1140ce032a534e5884a26c80422cbf6e', _us_entry_buffer=USEntryBuffer(_data={}), _spec=Subse...or_mssql.core.us_connection.ConnectionMSSQL object at 0x7f4fe5c5d8a0>, _cache_enabled=True, _exists=None, _subsql=None)
db = Db(_engine_wrapper=MSSQLEngineWrapper(_engine=Engine(mssql+pyodbc:///?odbc_connect=DRIVER%3D%7BFreeTDS%7D%3BServer%3Dd...s%3BPWD%3DqweRTY123%3BTDS_Version%3D8.0', engine_params=frozendict.frozendict({})), conn_type=ConnectionType('mssql')))
sync_conn_executor_factory = <function BaseConnectionTestClass.sync_conn_executor_factory.<locals>.factory at 0x7f4fd4b7a5f0>
subselect_view = 'test_view_from_subselect_rmaqnrf6mju6ta85ggjajb'

    def test_view_from_subselect(
        self,
        data_source: _SUBSELECT_DSRC_TV,
        db: Db,
        sync_conn_executor_factory: Callable[[], SyncConnExecutorBase],
        subselect_view: str,
    ) -> None:
        """Compare the subselect schema to a view-based schema"""
        dsrc = data_source
        conn_executor = sync_conn_executor_factory()
        schema = dsrc.get_schema_info(conn_executor_factory=sync_conn_executor_factory).schema
    
        # A bit of a hack, for easier inter-db testing:
        view_schema_info = conn_executor.get_table_schema_info(
            TableIdent(db_name=None, schema_name=None, table_name=subselect_view),
        )
        view_schema = dsrc._postprocess_raw_schema_from_db(view_schema_info).schema
        view_schema = self.postprocess_view_schema(view_schema, cursor_schema=schema)
    
        # for a more readable diff:
        if len(schema) == len(view_schema):
            sc_mismatch = [sc for sc, vsc in zip(schema, view_schema) if sc != vsc]
            vsc_mismatch = [vsc for sc, vsc in zip(schema, view_schema) if sc != vsc]
>           assert sc_mismatch == vsc_mismatch
E           AssertionError

/venv/lib/python3.10/site-packages/dl_core_testing/testcases/data_source.py:199: AssertionError