summaryrefslogtreecommitdiff
path: root/test/sql/test_text.py
diff options
context:
space:
mode:
authormike bayer <mike_mp@zzzcomputing.com>2017-01-13 15:41:20 -0500
committerGerrit Code Review <gerrit@awstats.zzzcomputing.com>2017-01-13 15:41:20 -0500
commit2c13aa097b3588a25173eb297eee08afd18f88d6 (patch)
tree2e25114ecf738ded9a3e050d970b7a5e3a639a60 /test/sql/test_text.py
parent0460bc79d9986132646049d8167bd5dbe3388a65 (diff)
parentfa6dd376bb24845724287d980a98ea50eb1cfab1 (diff)
downloadsqlalchemy-2c13aa097b3588a25173eb297eee08afd18f88d6.tar.gz
Merge "Support python3.6"
Diffstat (limited to 'test/sql/test_text.py')
-rw-r--r--test/sql/test_text.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/test/sql/test_text.py b/test/sql/test_text.py
index 20cb2a6fb..4a273e1ee 100644
--- a/test/sql/test_text.py
+++ b/test/sql/test_text.py
@@ -253,7 +253,8 @@ class BindParamTest(fixtures.TestBase, AssertsCompiledSQL):
def test_missing_bind_kw(self):
assert_raises_message(
exc.ArgumentError,
- "This text\(\) construct doesn't define a bound parameter named 'bar'",
+ r"This text\(\) construct doesn't define "
+ r"a bound parameter named 'bar'",
text(":foo").bindparams,
foo=5,
bar=7)
@@ -261,7 +262,8 @@ class BindParamTest(fixtures.TestBase, AssertsCompiledSQL):
def test_missing_bind_posn(self):
assert_raises_message(
exc.ArgumentError,
- "This text\(\) construct doesn't define a bound parameter named 'bar'",
+ r"This text\(\) construct doesn't define "
+ r"a bound parameter named 'bar'",
text(":foo").bindparams,
bindparam(
'foo',
@@ -273,8 +275,8 @@ class BindParamTest(fixtures.TestBase, AssertsCompiledSQL):
def test_escaping_colons(self):
# test escaping out text() params with a backslash
self.assert_compile(
- text("select * from foo where clock='05:06:07' "
- "and mork='\:mindy'"),
+ text(r"select * from foo where clock='05:06:07' "
+ r"and mork='\:mindy'"),
"select * from foo where clock='05:06:07' and mork=':mindy'",
checkparams={},
params={},
@@ -284,8 +286,8 @@ class BindParamTest(fixtures.TestBase, AssertsCompiledSQL):
def test_escaping_double_colons(self):
self.assert_compile(
text(
- "SELECT * FROM pg_attribute WHERE "
- "attrelid = :tab\:\:regclass"),
+ r"SELECT * FROM pg_attribute WHERE "
+ r"attrelid = :tab\:\:regclass"),
"SELECT * FROM pg_attribute WHERE "
"attrelid = %(tab)s::regclass",
params={'tab': None},