diff options
author | Darik Gamble <darik.gamble@gmail.com> | 2015-06-25 07:03:50 -0400 |
---|---|---|
committer | Darik Gamble <darik.gamble@gmail.com> | 2015-06-30 11:28:06 -0400 |
commit | 1355665270e3667e323b9a0dd1a24c57a41e46b9 (patch) | |
tree | b34857dba9703652e372127780a308665b6dca55 /tests/utils.py | |
parent | adf9a455f65c92d4e7651dcd52a2a074ffdfaaf4 (diff) |
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
Diffstat (limited to 'tests/utils.py')
-rw-r--r-- | tests/utils.py | 5 |
1 files changed, 3 insertions, 2 deletions
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 |