diff options
author | John Perkins <john.d.perkins@gmail.com> | 2016-08-05 13:45:49 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-09-20 12:11:11 -0400 |
commit | e95aa257aa3145a5db478d33fb1803494a38b46d (patch) | |
tree | 1e235379669c56444d21a3fa50b1e91d008686db /test/ext/declarative/test_basic.py | |
parent | 881369b949cff44e0017fdc28d9722ef3c26171a (diff) | |
download | sqlalchemy-e95aa257aa3145a5db478d33fb1803494a38b46d.tar.gz |
Add the "triggering mapper" to the configure_mappers error message.
There are cases where the originating mapper name is not
present in the exception message, such as relationship initialization
against an unmapped class. Ensure the originating mapper is named
in the string output.
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/298
Change-Id: I9f23bfa90b26dde9229ab7ec812eec9ceae48153
Diffstat (limited to 'test/ext/declarative/test_basic.py')
-rw-r--r-- | test/ext/declarative/test_basic.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/ext/declarative/test_basic.py b/test/ext/declarative/test_basic.py index 67018d737..08bc04048 100644 --- a/test/ext/declarative/test_basic.py +++ b/test/ext/declarative/test_basic.py @@ -772,9 +772,10 @@ class DeclarativeTest(DeclarativeTestBase): for i in range(3): assert_raises_message( sa.exc.InvalidRequestError, - "^One or more mappers failed to initialize - " - "can't proceed with initialization of other " - "mappers. Original exception was: When initializing.*", + "^One or more mappers failed to initialize" + " - can't proceed with initialization of other mappers. " + r"Triggering mapper: 'Mapper\|User\|users'. " + "Original exception was: When initializing.*", configure_mappers) def test_custom_base(self): |