summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAmjith Ramanujam <amjith.r@gmail.com>2015-02-26 23:28:21 -0800
committerAmjith Ramanujam <amjith.r@gmail.com>2015-02-26 23:28:21 -0800
commiteded02a0a854339e106157457506a3a5f9e30a17 (patch)
tree8ae947902e3c2c1efc38d4bedc437ee25cfa8be2 /tests
parent1391b569394e4830cb4b883b77ee06b5f9c0dd15 (diff)
Add a test for the special multi-command case.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_pgexecute.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_pgexecute.py b/tests/test_pgexecute.py
index 6782e347..94f98627 100644
--- a/tests/test_pgexecute.py
+++ b/tests/test_pgexecute.py
@@ -99,6 +99,14 @@ def test_multiple_queries_same_line(executor):
assert "bar" in result[2]
@dbtest
+def test_multiple_queries_with_special_command_same_line(executor):
+ result = run(executor, "select 'foo'; \d")
+ assert len(result) == 4 # 2 * (output+status)
+ assert "foo" in result[0]
+ # This is a lame check. :(
+ assert "Schema" in result[2]
+
+@dbtest
def test_multiple_queries_same_line_syntaxerror(executor):
with pytest.raises(psycopg2.ProgrammingError) as excinfo:
run(executor, "select 'foo'; invalid syntax")