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

DB Tests use common driver name expansion with application code #53

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

beforan
Copy link
Member

@beforan beforan commented Jan 24, 2025

Pull Request Contents

🦋 Bug Fix

Description

This PR refactors the db drivername expansion into a function, and then ensures the function is used by the application code and database integration tests.

Related Issues or other material

  • This PR relates to one or more issues, detailed below

Screenshots, example outputs/behaviour etc.

> export DATASOURCE_DB_DRIVERNAME=postgresql
uv run pytest
================================================ test session starts =================================================
platform linux -- Python 3.13.1, pytest-8.3.4, pluggy-1.5.0
rootdir: /home/beforan/src/hutch-bunny
configfile: pyproject.toml
collected 9 items                                                                                                    

tests/test_demographics_distribution_query.py .....                                                            [ 55%]
tests/test_return.py ....                                                                                      [100%]

================================================= 9 passed in 1.96s ==================================================

✅ Added/updated tests?

  • This PR contains relevant tests
    • Or doesn't need to per the below explanation
  • I've completed all actions and tasks detailed in the PR Template

vpnu
vpnu previously approved these changes Jan 24, 2025
@beforan beforan merged commit d20b2a3 into main Jan 24, 2025
5 checks passed
@beforan beforan deleted the fix-test-db-driver branch January 24, 2025 10:05
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 fail using documented example configuration
2 participants