summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/sqlalchemy/orm/mapper.py6
-rw-r--r--test/ext/declarative/test_basic.py6
-rw-r--r--test/orm/test_mapper.py8
3 files changed, 10 insertions, 10 deletions
diff --git a/lib/sqlalchemy/orm/mapper.py b/lib/sqlalchemy/orm/mapper.py
index b76a6f727..803d95feb 100644
--- a/lib/sqlalchemy/orm/mapper.py
+++ b/lib/sqlalchemy/orm/mapper.py
@@ -2826,10 +2826,10 @@ def configure_mappers():
for mapper in list(_mapper_registry):
if getattr(mapper, '_configure_failed', False):
e = sa_exc.InvalidRequestError(
- "One or more mappers failed to initialize - "
+ "One (%s) or more mappers failed to initialize - "
"can't proceed with initialization of other "
- "mappers. Original exception was: %s"
- % mapper._configure_failed)
+ "mappers. Original exception was: %s"
+ % (mapper, mapper._configure_failed))
e._configure_failed = mapper._configure_failed
raise e
if not mapper.configured:
diff --git a/test/ext/declarative/test_basic.py b/test/ext/declarative/test_basic.py
index ae1a85f8b..2fc9dcafd 100644
--- a/test/ext/declarative/test_basic.py
+++ b/test/ext/declarative/test_basic.py
@@ -772,9 +772,9 @@ 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 (Mapper|User|users) or more mappers failed to initialize"
+ " - can't proceed with initialization of other mappers. "
+ "Original exception was: When initializing.*",
configure_mappers)
def test_custom_base(self):
diff --git a/test/orm/test_mapper.py b/test/orm/test_mapper.py
index bc5f24fb2..78a149cf0 100644
--- a/test/orm/test_mapper.py
+++ b/test/orm/test_mapper.py
@@ -153,10 +153,10 @@ class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL):
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: Class "
+ "^One (Mapper|Address|addresses) or more "
+ "mappers failed to initialize - can't "
+ "proceed with initialization of other "
+ "mappers. Original exception was: Class "
"'test.orm._fixtures.User' is not mapped$",
configure_mappers)