summaryrefslogtreecommitdiff
path: root/test/sql
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-12-18 18:26:15 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2013-12-18 18:26:15 -0500
commit2692238f45ae4d2f46949dfa52b16132bd266e0e (patch)
tree3ea336d98a01461b51da530bf0aca155b891fdd0 /test/sql
parentf701f87c1374c1e4d80b9f47c17632518cece765 (diff)
downloadsqlalchemy-2692238f45ae4d2f46949dfa52b16132bd266e0e.tar.gz
- Improvements to the system by which SQL types generate within
``__repr__()``, particularly with regards to the MySQL integer/numeric/ character types which feature a wide variety of keyword arguments. The ``__repr__()`` is important for use with Alembic autogenerate for when Python code is rendered in a migration script. [ticket:2893]
Diffstat (limited to 'test/sql')
-rw-r--r--test/sql/test_types.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/sql/test_types.py b/test/sql/test_types.py
index a04f56ba4..dbc4716ef 100644
--- a/test/sql/test_types.py
+++ b/test/sql/test_types.py
@@ -967,6 +967,14 @@ class EnumTest(AssertsCompiledSQL, fixtures.TestBase):
# depending on backend.
assert "('x'," in e.print_sql()
+ def test_repr(self):
+ e = Enum("x", "y", name="somename", convert_unicode=True,
+ quote=True, inherit_schema=True)
+ eq_(
+ repr(e),
+ "Enum('x', 'y', name='somename', inherit_schema=True)"
+ )
+
class BinaryTest(fixtures.TestBase, AssertsExecutionResults):
__excluded_on__ = (
('mysql', '<', (4, 1, 1)), # screwy varbinary types