"""target dialect supports reflection of unique constraints"""
return exclusions.open()
+ @property
+ def duplicate_key_raises_integrity_error(self):
+ """target dialect raises IntegrityError when reporting an INSERT
+ with a primary key violation. (hint: it should)
+
+ """
+ return exclusions.open()
+
@property
def unbounded_varchar(self):
"""Target database must support VARCHAR with no length"""
from .. import fixtures, config
+from ..config import requirements
from sqlalchemy import exc
from sqlalchemy import Integer, String
from .. import assert_raises
Column('data', String(50))
)
+ @requirements.duplicate_key_raises_integrity_error
def test_integrity_error(self):
with config.db.begin() as conn:
("mssql+pyodbc", None, None, "crashes due to bug #351"),
)
+ @property
+ def duplicate_key_raises_integrity_error(self):
+ return fails_on("postgresql+pg8000")
+
@property
def python2(self):
return skip_if(