Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PECO-1435] Restore tests.py to the test suite #331

Merged
merged 8 commits into from
Jan 26, 2024
Merged

[PECO-1435] Restore tests.py to the test suite #331

merged 8 commits into from
Jan 26, 2024

Conversation

susodapop
Copy link
Contributor

Description

This closes #317. Somewhere about 18 months ago we move to from using unittest to pytest as our test runner. These tests were contained in a file called tests.py which would not be auto-discovered by pytest because it doesn't have the prefix test_ in its filename.

13 of these tests failed at-first. Because we've done 18 months of development since then and changed some of the internal interfaces that these unit tests exercise. So I've gone through and updated as many of the tests as I could within a couple hours to get them to pass. Now only 2 of them fail.

I chose not to fix those remaining two because they deal with the internal interface for handling arrow batches which I'm about to rewrite anyway. I'll pick these up in that effort next week.

Jesse Whitehouse added 6 commits January 25, 2024 16:25
Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>
FAILED tests/unit/test_clientTestSuite.py::ClientTestSuite::test_auth_args - ...
FAILED tests/unit/test_clientTestSuite.py::ClientTestSuite::test_authtoken_passthrough
FAILED tests/unit/test_clientTestSuite.py::ClientTestSuite::test_close_uses_the_correct_session_id
FAILED tests/unit/test_clientTestSuite.py::ClientTestSuite::test_closing_connection_closes_commands
FAILED tests/unit/test_clientTestSuite.py::ClientTestSuite::test_context_manager_closes_connection
FAILED tests/unit/test_clientTestSuite.py::ClientTestSuite::test_cursor_keeps_connection_alive
FAILED tests/unit/test_clientTestSuite.py::ClientTestSuite::test_disable_pandas_respected
FAILED tests/unit/test_clientTestSuite.py::ClientTestSuite::test_execute_parameter_passthrough
FAILED tests/unit/test_clientTestSuite.py::ClientTestSuite::test_executemany_parameter_passhthrough_and_uses_last_result_set
FAILED tests/unit/test_clientTestSuite.py::ClientTestSuite::test_executing_multiple_commands_uses_the_most_recent_command
FAILED tests/unit/test_clientTestSuite.py::ClientTestSuite::test_finalizer_closes_abandoned_connection
FAILED tests/unit/test_clientTestSuite.py::ClientTestSuite::test_row_number_respected
FAILED tests/unit/test_clientTestSuite.py::ClientTestSuite::test_staging_operation_response_is_handled

Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>
This should have been incorporated into #170

Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>
Since this test was written we now set the user agent and auth provider
on every ThriftBackend creation. The fix here is to unpack the remaining
call_args into _ with the unpack operator `*`

Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>
This test is superceded by test_access_token_provider

Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>
Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>
…m rn

Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>
Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>
@susodapop susodapop merged commit e3cd361 into main Jan 26, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tests/unit/tests.py has broken tests and does not run in CI
2 participants