summaryrefslogtreecommitdiffstats
path: root/tests/features/steps/wrappers.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-09-06 04:17:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-09-06 04:17:09 +0000
commit76d27bc43d56d7ef3ca0090fb199777888adf7c3 (patch)
treeb6d3d562a0be03d404426bb43aff62174be3dc5e /tests/features/steps/wrappers.py
parentAdding upstream version 3.1.0. (diff)
downloadpgcli-76d27bc43d56d7ef3ca0090fb199777888adf7c3.tar.xz
pgcli-76d27bc43d56d7ef3ca0090fb199777888adf7c3.zip
Adding upstream version 3.2.0.upstream/3.2.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/features/steps/wrappers.py')
-rw-r--r--tests/features/steps/wrappers.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/features/steps/wrappers.py b/tests/features/steps/wrappers.py
index e0f5a20..0ca8366 100644
--- a/tests/features/steps/wrappers.py
+++ b/tests/features/steps/wrappers.py
@@ -39,9 +39,15 @@ def expect_exact(context, expected, timeout):
def expect_pager(context, expected, timeout):
+ formatted = expected if isinstance(expected, list) else [expected]
+ formatted = [
+ f"{context.conf['pager_boundary']}\r\n{t}{context.conf['pager_boundary']}\r\n"
+ for t in formatted
+ ]
+
expect_exact(
context,
- "{0}\r\n{1}{0}\r\n".format(context.conf["pager_boundary"], expected),
+ formatted,
timeout=timeout,
)
@@ -57,7 +63,7 @@ def run_cli(context, run_args=None, prompt_check=True, currentdb=None):
context.cli.logfile = context.logfile
context.exit_sent = False
context.currentdb = currentdb or context.conf["dbname"]
- context.cli.sendline("\pset pager always")
+ context.cli.sendline(r"\pset pager always")
if prompt_check:
wait_prompt(context)