From bb12d553a42f99442598d8603a3ff2ab7e4240e6 Mon Sep 17 00:00:00 2001 From: Darik Gamble Date: Sat, 3 Oct 2015 14:41:31 -0400 Subject: Fix need_completion_refresh Was only actually checking the first command in multiple commands --- tests/test_main.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 tests/test_main.py (limited to 'tests/test_main.py') diff --git a/tests/test_main.py b/tests/test_main.py new file mode 100644 index 00000000..e25f7f08 --- /dev/null +++ b/tests/test_main.py @@ -0,0 +1,10 @@ +import pytest +from pgcli.main import need_completion_refresh + + +@pytest.mark.parametrize('sql', [ + 'DROP TABLE foo', + 'SELECT * FROM foo; DROP TABLE foo', +]) +def test_need_completion_refresh(sql): + assert need_completion_refresh(sql) \ No newline at end of file -- cgit v1.2.3