diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-09-23 16:40:16 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-09-23 16:40:16 -0400 |
| commit | 47fcb1d0b6ad6481e89d4b2e8c2cc29cf7c03d8b (patch) | |
| tree | 2c7c90f92f1e5bf675edf265f2d90947007ff555 /test/orm/test_options.py | |
| parent | 3dfcb10befc7a8c193ee992bdea009e39b2e798c (diff) | |
| download | sqlalchemy-47fcb1d0b6ad6481e89d4b2e8c2cc29cf7c03d8b.tar.gz | |
- Fixed rare TypeError which could occur when stringifying certain
kinds of internal column loader options within internal logging.
fixes #3539
Diffstat (limited to 'test/orm/test_options.py')
| -rw-r--r-- | test/orm/test_options.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/orm/test_options.py b/test/orm/test_options.py index 1c1a797a6..e1e26c62c 100644 --- a/test/orm/test_options.py +++ b/test/orm/test_options.py @@ -2,7 +2,7 @@ from sqlalchemy import inspect from sqlalchemy.orm import attributes, mapper, relationship, backref, \ configure_mappers, create_session, synonym, Session, class_mapper, \ aliased, column_property, joinedload_all, joinedload, Query,\ - util as orm_util, Load + util as orm_util, Load, defer import sqlalchemy as sa from sqlalchemy import testing from sqlalchemy.testing.assertions import eq_, assert_raises, assert_raises_message @@ -46,8 +46,18 @@ class PathTest(object): set([self._make_path(p) for p in paths]) ) + class LoadTest(PathTest, QueryTest): + def test_str(self): + User = self.classes.User + l = Load(User) + l.strategy = (('deferred', False), ('instrument', True)) + eq_( + str(l), + "Load(strategy=(('deferred', False), ('instrument', True)))" + ) + def test_gen_path_attr_entity(self): User = self.classes.User Address = self.classes.Address |
