]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Use type_ when creating literals in _LiteralRoundTripFixture
authorJim Fulton <jim@jimfulton.info>
Mon, 17 May 2021 15:29:54 +0000 (11:29 -0400)
committersqla-tester <sqla-tester@sqlalchemy.org>
Mon, 17 May 2021 15:29:54 +0000 (11:29 -0400)
Fixes #6496 by passing the `type_` argument passed to `run` to `literal`.

This pull request is:

- [ ] A documentation / typographical error fix
- Good to go, no issue or tests are needed
- [X] A short code fix
- please include the issue number, and create an issue if none exists, which
  must include a complete example of the issue.  one line code fixes without an
  issue and demonstration will not be accepted.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.   one line code fixes without tests will not be accepted.
- [ ] A new feature implementation
- please include the issue number, and create an issue if none exists, which must
  include a complete example of how the feature would look.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.

**Have a nice day!**

Closes: #6497
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/6497
Pull-request-sha: 5f82408b2c25c7593f7202533dde4e29f045de5d

Change-Id: Ieed822c157f91d95fe3a07ea4482a36777539c35

lib/sqlalchemy/testing/suite/test_types.py

index 468a1660e25c9d7160585b5bf558ade05afc01d8..3c4a80573517ec0d84f6ee45333bc5a61a7dc8b9 100644 (file)
@@ -63,7 +63,7 @@ class _LiteralRoundTripFixture(object):
             for value in input_:
                 ins = (
                     t.insert()
-                    .values(x=literal(value))
+                    .values(x=literal(value, type_))
                     .compile(
                         dialect=testing.db.dialect,
                         compile_kwargs=dict(literal_binds=True),