Skip to content

Mark test_execute_statements_does_not_split_inside_literals as dbtest - #1643

Merged
dbaty merged 1 commit into
dbcli:mainfrom
musicinmybrain:dbtest-202609
Sep 20, 2026
Merged

dbaty merged 1 commit into
dbcli:mainfrom
musicinmybrain:dbtest-202609

Conversation

@musicinmybrain

Copy link
Copy Markdown
Contributor

Description

Adds the @dbtest decorator to test_execute_statements_does_not_split_inside_literals so that it is skipped when a postgres database isn’t accessible on localhost. Otherwise, this test would error during test collection when no database is available:

E           psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5432 failed: Connection refused
E               Is the server running on that host and accepting TCP/IP connections?
E           Multiple connection attempts failed. All failures were:
E           - host: 'localhost', port: 5432, hostaddr: '::1': connection failed: connection to server at "::1", port 5432 failed: Connection refused
E               Is the server running on that host and accepting TCP/IP connections?
E           - host: 'localhost', port: 5432, hostaddr: '127.0.0.1': connection failed: connection to server at "127.0.0.1", port 5432 failed: Connection refused
E               Is the server running on that host and accepting TCP/IP connections?

Checklist

  • I've added this contribution to the changelog.rst. This seems unnecessary, since the change is so trivial.
  • I've added my name to the AUTHORS file (or it's already there). Let me know if you want me to do this. I see this as a trivial, uncreative contribution, but I can add my name if you like.
  • I installed pre-commit hooks (pip install pre-commit && pre-commit install).
  • I verified that my changes work as expected (this may include manually testing them in your local environment, or in other available environments). Cross this out if not relevant (for example, if you're making a documentation change).
  • Please squash merge this pull request (uncheck if you'd like us to merge as multiple commits)

@dbaty dbaty left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thank you.

@dbaty
dbaty merged commit 101e523 into dbcli:main Sep 20, 2026
1 of 2 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.

2 participants