diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-07-10 11:26:13 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-07-10 11:26:13 -0400 |
| commit | e5d0fa94937b6572bbf4a08d4a8870e749fcea03 (patch) | |
| tree | 1b032764420141d19560b89aa8beb4e453da826e /test/sql | |
| parent | 1fc440393a612abcb837871003ac0d81721e1938 (diff) | |
| download | sqlalchemy-e5d0fa94937b6572bbf4a08d4a8870e749fcea03.tar.gz | |
- The :meth:`.TypeEngine.with_variant` method will now accept a
type class as an argument which is internally converted to an
instance, using the same convention long established by other
constructs such as :class:`.Column`. fixes #3122
Diffstat (limited to 'test/sql')
| -rw-r--r-- | test/sql/test_types.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/sql/test_types.py b/test/sql/test_types.py index 1130c9e40..e5c1e7b62 100644 --- a/test/sql/test_types.py +++ b/test/sql/test_types.py @@ -816,6 +816,13 @@ class VariantTest(fixtures.TestBase, AssertsCompiledSQL): dialect=dialects.postgresql.dialect() ) + def test_to_instance(self): + self.assert_compile( + self.UTypeOne().with_variant(self.UTypeTwo, "postgresql"), + "UTYPETWO", + dialect=dialects.postgresql.dialect() + ) + def test_compile_composite(self): self.assert_compile( self.composite, |
