existing = self[key]
if not existing.shares_lineage(value):
util.warn('Column %r on table %r being replaced by '
- '%r , which has the same key. Consider '
+ '%r, which has the same key. Consider '
'use_labels for select() statements.' % (key,
getattr(existing, 'table', None), value))
self._all_cols.remove(existing)
def _assert_labels_warning(self, s):
assert_raises_message(
exc.SAWarning,
- "replaced by another column with the same key",
+ r"replaced by Column.*, which has the same key",
lambda: s.c
)