diff options
author | Darik Gamble <darik.gamble@gmail.com> | 2015-10-28 09:23:23 -0400 |
---|---|---|
committer | Darik Gamble <darik.gamble@gmail.com> | 2015-10-28 10:58:29 -0400 |
commit | 1ea9bf735bd27566bb89e3b1a540ecd229ac6567 (patch) | |
tree | d35bfc04ad4017ebb51c0a27ccb722d68828419d /tests/test_main.py | |
parent | edcc5c8a2d9a2589f81a2a1fb037240a65d94fb8 (diff) |
Refactor a lot of `run_cli` into smaller submethods:
`_build_cli`, '_evaluate_command` and `_handle_server_closed_connection`
_evalute_command returns (output, MetaQuery) tuple where MetaQuery is a namedtuple
(query, successful, total_time, meta_changed, db_changed, path_changed, mutated)
Diffstat (limited to 'tests/test_main.py')
-rw-r--r-- | tests/test_main.py | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/tests/test_main.py b/tests/test_main.py index f98aae5e..0d026994 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -1,19 +1,12 @@ import pytest import platform -from pgcli.main import need_completion_refresh, obfuscate_process_password try: import setproctitle except ImportError: setproctitle = None +from pgcli.main import obfuscate_process_password -@pytest.mark.parametrize('sql', [ - 'DROP TABLE foo', - 'SELECT * FROM foo; DROP TABLE foo', -]) -def test_need_completion_refresh(sql): - assert need_completion_refresh(sql) - @pytest.mark.skipif(platform.system() == 'Windows', reason='Not applicable in windows') @pytest.mark.skipif(not setproctitle, |