summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/testing')
-rw-r--r--lib/sqlalchemy/testing/suite/test_reflection.py13
-rw-r--r--lib/sqlalchemy/testing/suite/test_types.py4
2 files changed, 13 insertions, 4 deletions
diff --git a/lib/sqlalchemy/testing/suite/test_reflection.py b/lib/sqlalchemy/testing/suite/test_reflection.py
index 54b59a432..7674338b4 100644
--- a/lib/sqlalchemy/testing/suite/test_reflection.py
+++ b/lib/sqlalchemy/testing/suite/test_reflection.py
@@ -104,9 +104,12 @@ class ComponentReflectionTest(fixtures.TablesTest):
)
Table('comment_test', metadata,
Column('id', sa.Integer, primary_key=True, comment='id comment'),
- Column('data', sa.String(20), comment='data comment'),
+ Column('data', sa.String(20), comment='data % comment'),
+ Column(
+ 'd2', sa.String(20),
+ comment=r"""Comment types type speedily ' " \ '' Fun!"""),
schema=schema,
- comment='the test table comment')
+ comment=r"""the test % ' " \ table comment""")
if testing.requires.index_reflection.enabled:
cls.define_index(metadata, users)
@@ -274,7 +277,7 @@ class ComponentReflectionTest(fixtures.TablesTest):
eq_(
insp.get_table_comment("comment_test", schema=schema),
- {"text": "the test table comment"}
+ {"text": r"""the test % ' " \ table comment"""}
)
eq_(
@@ -290,7 +293,9 @@ class ComponentReflectionTest(fixtures.TablesTest):
],
[
{'comment': 'id comment', 'name': 'id'},
- {'comment': 'data comment', 'name': 'data'}
+ {'comment': 'data % comment', 'name': 'data'},
+ {'comment': r"""Comment types type speedily ' " \ '' Fun!""",
+ 'name': 'd2'}
]
)
diff --git a/lib/sqlalchemy/testing/suite/test_types.py b/lib/sqlalchemy/testing/suite/test_types.py
index a345454be..83aac2850 100644
--- a/lib/sqlalchemy/testing/suite/test_types.py
+++ b/lib/sqlalchemy/testing/suite/test_types.py
@@ -187,6 +187,10 @@ class TextTest(_LiteralRoundTripFixture, fixtures.TablesTest):
data = r'backslash one \ backslash two \\ end'
self._literal_round_trip(Text, [data], [data])
+ def test_literal_percentsigns(self):
+ data = r'percent % signs %% percent'
+ self._literal_round_trip(Text, [data], [data])
+
class StringTest(_LiteralRoundTripFixture, fixtures.TestBase):
__backend__ = True