sqlalchemy / sqlalchemy/sqlalchemy

Some tests for dialect ignores lack of support of CHECK CONSTRAINT

Open
#8,805 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug tests
Dominant language
Python
Stars
12.2k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

Faced during the development of a new Dialect https://github.com/caretdev/sqlalchemy-iris/

for instance sqlalchemy/testing/suite/test_reflection.py - QuotedNameArgumentTest
Uses CheckConstraint unconditionally

To Reproduce
@property
    def check_constraint_reflection(self):
        """target dialect supports reflection of check constraints"""
        return exclusions.closed()
    def visit_check_constraint(self, constraint, **kw):
        raise exc.CompileError("Check CONSTRAINT is not supported")


### Error

Check CONSTRAINT is not supported

### Versions

- OS:
- Python:
- SQLAlchemy:
- Database:
- DBAPI `intersystems-iris`

https://pypi.org/project/sqlalchemy-iris/


### Additional context

_No response_

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in sqlalchemy/testing/suite/test_reflection.py at QuotedNameArgumentTest and review how the check_constraint_reflection exclusion is defined and used. Run the affected reflection tests with a dialect that raises the shown CompileError; done means tests that require CHECK CONSTRAINT support are skipped or gated appropriately for unsupported dialects.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sqlalchemy
Domain
databases, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.