summaryrefslogtreecommitdiffstats
path: root/tests
AgeCommit message (Collapse)Author
2021-05-07Blacken.Amjith Ramanujam
2021-05-07Add tests for search_path function completion.Amjith Ramanujam
2021-05-06Blacken.Amjith Ramanujam
2021-02-22skip initial comment in pg_session file (#1245)Georgy Frolov
* skip initial comment in pg_session file * add test
2021-02-22Fix test_config.py on Windows (#1247)ERYoung11
* fixing test_config.py to work on windows * Getting rid of odd characters in wrappager.py * added a space to a comment to try to kick the github workflow. Co-authored-by: Eric Young <YoungEricR@JohnDeere.com>
2021-02-15Postgres user has password in ci. (#1243)Irina Truong
2021-02-12Finer control over destructive warning. (#1242)Irina Truong
* Finer control over destructive warning. * Review feedback. * Changelog. * Run integration tests with --warn=moderate. * Fix typo. * Black.
2021-02-12Modernize code to Python 3.6+ (#1229)Miroslav Šedivý
1. `class A(object)` can be written as `class A:` 2. replace `dict([…])` and `set([…])` with `{…}` 3. use f-strings or compact `.format` 4. use `yield from` instead of `yield` in a `for` loop 5. import `mock` from `unittest` 6. expect `OSError` instead of `IOError` or `select` error 7. use Python3 defaults for file reading or `super()` 8. remove redundant parenthesis (keep those in tuples though) 9. shorten set intersection instead of creating lists 10. backslashes in strings do not have to be escaped if prepended with `r`
2021-01-18Conditional didn't work in CI. (#1237)Irina Truong
* Conditional didn't work in CI. * Try to fix flaky exit.
2020-12-01dependencies: add support for sqlparse 0.4.x (#1224)Kevin Marsh
2020-10-13test: test pgcli on python3.9 (#1214)laixintao
* test: test pgcli on python3.9 * test on 3.9 * use 3.9-dev version from travis. * try to fix pexpect EOF.
2020-07-31Update suggestion literals (#1195)Sky.G.Uieen
* Updated all data types literals * Updated sql functions literals * Updated changelog and auther * Updated test code * Added datatype test case
2020-04-17Add pg_service.conf handling (#1155)g.denis
* add parse_service_info * added tests * changelog + AUTHORS * py35
2020-04-05upgrade prompt-toolit to 3.0 (#1149)赖信涛
* upgrade prompt-toolit to 3.0 fix: https://github.com/dbcli/pgcli/issues/1148 related: https://github.com/prompt-toolkit/python-prompt-toolkit/issues/886 in order to make the `behave` test pass, I have to: - extend timeout for database connection test. - extend timeout for basic command expect. - extend timeout for features/steps/crud_table.py:: see data selected. - disable cpr for features but "run the cli" * [ci] disable CPR for all behave tests. * bugfix: remove duplicated prompt expect. * [ci] delete CPR env setting. * Revert "[ci] delete CPR env setting." This reverts commit fe4d5b565e01be6237b6df646429d26eaa0c6d92. * revert the extending timeout back. * [ci] test when didn't disable CPR. * Revert "[ci] test when didn't disable CPR." This reverts commit d379b1e736dcc6623ba53fc3d4e6f095fd3e8344.
2020-03-14removed py2-related stuffGeorgy Frolov
2020-03-09Deprecate Python2.7. (#1153)赖信涛
* deprecate Python2.7. So we can use latest version of prompt-toolit. Relate: https://github.com/dbcli/pgcli/pull/1149 * black format, remove 2.7 support. * using version py35 for black. * Revert "black format, remove 2.7 support." This reverts commit 4b6d0496ccc18d0ebd696b5f21d8065c4a9b0cb9. * deprecated py27 using black. * remove 2.7 from travis. * update setup.py: delete python 2.7 support.
2019-10-29run black againMartin Matějek
2019-10-23Add a test to verify error message.Amjith Ramanujam
2019-10-12fixup! Take account of table aliases when completing function args (#1048)Owen Stephens
2019-10-12Take account of table aliases when completing function args (#1048)Owen Stephens
2019-08-23Issue 1018 display first 1k rows (#1092)Irina Truong
* Added changes to remove the prompt on >1000 rows queries * Reformatted with black * Changed comment on row_limit parameter * Added contribution to changelog and name to AUTHORS * Refactored test to reflect new functionality * Removed argument * Removed debug echo statement * Reformatted with black * Added changes to remove the prompt on >1000 rows queries * Reformatted with black * Changed comment on row_limit parameter * Added contribution to changelog and name to AUTHORS * Refactored test to reflect new functionality * Removed argument * Removed debug echo statement * Reformatted with black * Added missing issue numbers in changelog * Reformatted code using black
2019-06-02Run black on test files.Amjith Ramanujam
2019-06-02Add \G as a temporary way to use expanded mode.Amjith Ramanujam
This is similar to mycli.
2019-05-25black all the things. (#1049)Irina Truong
* added black to develop guide * no need for pep8radius. * changelog. * Add pre-commit checkbox. * Add pre-commit to dev reqs. * Add pyproject.toml for black. * Pre-commit config. * Add black to travis and dev reqs. * Install and run black in travis. * Remove black from dev reqs. * Lower black target version. * Re-format with black.
2019-05-21pep8.Irina Truong
2019-05-21Fix for dsn_password behave test.Irina Truong
2019-05-15Add a behave test with spaces in password.Amjith Ramanujam
2019-05-14Add some behavioral tests for command line options.Amjith Ramanujam
2019-05-06Fix the tests.Amjith Ramanujam
2019-05-06Upgrade to sqlparse 0.3.0.Amjith Ramanujam
2019-04-27Allow application_name to be overridden (#1044)raylu
* Allow application_name to be overridden * Fixed broken link. * Default password value is empty str? * Make pep8 happier.
2019-03-18pep8.Irina Truong
2019-03-18Unit test.Irina Truong
2019-02-08fix unhashable formatted textDick Marinus
2019-01-22Merge pull request #1001 from dbcli/internal/add_behave_loggingAmjith Ramanujam
Missed logfile for earlier clean up and add behave logging changes
2019-01-22Merge pull request #996 from saper/pexpect_exceptionsDick Marinus
Use pexpect.TIMEOUT instead of pexpect.exceptions.TIMEOUT
2019-01-22fixup! Clean up and add behave logging (#956)Dick Marinus
2019-01-22VISUAL overrides the value of EDITOR for the \e commandMarcin Cieślak
This is an ancient UNIX tradition universally respected.
2019-01-22Use pexpect.TIMEOUT instead of pexpect.exceptions.TIMEOUTMarcin Cieślak
All pexpect submodules have been moved into the pexpect package as of version 3.0.
2019-01-03Support multihost connection string (#978)Mikhail Elovskikh
* Switch to psycopg2 parse_dsn instead of urlparse * Added wronglink to contributors and updated changelog * Fix test codestyle * Support for PGPORT customization in tests * Support for PGPORT customization in tests * Refactored PGExecute init and moved short_host generation to object property * Fix test util codestyle * Fix local tests run * Store PGExecute initial params in _conn_params and added PGExecute.copy method * Fix codestyle * Added docstring to PGExecute.copy() method
2019-01-02Remove some functions completions (#982)Irina Truong
Remove extension and private functions from completer.
2018-11-27Fix special commands (#973)Amjith Ramanujam
* Add tests for special commands completion.
2018-10-14Clean up and add behave logging (#956)Dick Marinus
2018-10-02Fix for pgcli --list. (#952)Irina Truong
Fix for pgcli --list
2018-09-28Cherry-picked prompt-toolkit 2.0 changes. (#930)Irina Truong
* Cherry-picked prompt-toolkit 2.0 changes. * Increase help timeout. * Missed one. * Fixes editor command. * Expect exact to fix named query error. * Unicode is non-optional with ptk 2.0. * Unicode literals all the things (almost). * PEP8. * Change how we swap completers. * By default, bottom toolbar styles are reversed. We don't want that. * Adapt styles to 2.0. * The future is now. Switch to ptk 2.0 style names. * PEP8. * Flag for enable_open_in_editor. * add class:prompt to prompt * Removed workaround for #668. Some renaming. * use pgcli.completer instead of app.current_buffer.completer * enable_system_prompt=True like old prompt toolkit * keep search_ignore_case enabled (was ignore_case) * fix closing parenthese * keep marking class:continuation token for continuation * capture KeyboardInterrupt manually AbortAction has been removed in Prompt_toolkit 2.0 * replace C-J with enter, add more comments * reversed ([...]) to [(...)] (oops) * pep8 fixes * Does Vi mode have to be applied to session every time? * (workaround) also enable vi_mode after edit command * Fixed test errors after rebasing on master.
2018-09-23Merge pull request #871 from maxrothman/masterIrina Truong
Respect \pset pager on expected behavior
2018-09-23Respect \pset pager on expected behaviorMax Rothman
"\pset pager" has three possible values: "always", "on", and "off". pgcli previously treated all non-"off" values as "always". This change implements the expected behavior, which is to use the pager when the output is larger than the terminal height (See \pset pager in https://www.postgresql.org/docs/9.2/static/app-psql.html). Pgcli adds to this by also using the pager when the output is wider than the terminal width. Fixes #813
2018-09-22pep8Irina Truong
2018-09-22Revert abs imports in tests.Irina Truong
2018-09-22pep8Irina Truong