diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-11-14 08:54:56 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-11-14 10:28:40 -0500 |
| commit | eea0f44bbdb759368996dcdb241e837c7c809fb9 (patch) | |
| tree | 12ecc66f8183896b833a08c90ebf39799610d816 /test/dialect/postgresql | |
| parent | 9f4ac8d155f58b59cf314cfbc73195ed51a0c146 (diff) | |
| download | sqlalchemy-eea0f44bbdb759368996dcdb241e837c7c809fb9.tar.gz | |
add informative exception context for literal render
An informative re-raise is now thrown in the case where any "literal
bindparam" render operation fails, indicating the value itself and
the datatype in use, to assist in debugging when literal params
are being rendered in a statement.
Fixes: #8800
Change-Id: Id658f8b03359312353ddbb0c7563026239579f7b
Diffstat (limited to 'test/dialect/postgresql')
| -rw-r--r-- | test/dialect/postgresql/test_types.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/dialect/postgresql/test_types.py b/test/dialect/postgresql/test_types.py index 83cea8f15..39e7d7317 100644 --- a/test/dialect/postgresql/test_types.py +++ b/test/dialect/postgresql/test_types.py @@ -1528,8 +1528,9 @@ class ArrayTest(AssertsCompiledSQL, fixtures.TestBase): return "MYTYPE" with expect_raises_message( - NotImplementedError, - r"Don't know how to literal-quote value \[1, 2, 3\]", + exc.CompileError, + r"No literal value renderer is available for literal " + r"value \"\[1, 2, 3\]\" with datatype ARRAY", ): self.assert_compile( select(literal([1, 2, 3], ARRAY(MyType()))), |
