From 1355665270e3667e323b9a0dd1a24c57a41e46b9 Mon Sep 17 00:00:00 2001 From: Darik Gamble Date: Thu, 25 Jun 2015 07:03:50 -0400 Subject: format_output takes an extra arg instead of referencing pgspecial directly This also allows us to simplify some of the tests in test_pgexecute, which tested with and without expanded output by first running '\x', which is a pretty roundabout way of mutating a global variable --- tests/utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/utils.py') diff --git a/tests/utils.py b/tests/utils.py index 5cdc8849..0287a2e9 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -58,11 +58,12 @@ def drop_tables(conn): DROP SCHEMA IF EXISTS schema2 CASCADE''') -def run(executor, sql, join=False): +def run(executor, sql, join=False, expanded=False): " Return string output for the sql to be run " result = [] for title, rows, headers, status in executor.run(sql): - result.extend(format_output(title, rows, headers, status, 'psql')) + result.extend(format_output(title, rows, headers, status, 'psql', + expanded=expanded)) if join: result = '\n'.join(result) return result -- cgit v1.2.3