1
0
Fork 0

upgrade 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 fe4d5b565e.

* revert the extending timeout back.

* [ci] test when didn't disable CPR.

* Revert "[ci] test when didn't disable CPR."

This reverts commit d379b1e736.
This commit is contained in:
赖信涛 2020-04-06 11:56:31 +08:00 committed by GitHub
parent 93c14f844e
commit b6e2a229e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 2 deletions

View File

@ -19,6 +19,7 @@ Internal:
* Drop Python2.7, 3.4, 3.5 support. (Thanks: `laixintao`_)
* Support Python3.8. (Thanks: `laixintao`_)
* Fix dead link in development guide. (Thanks: `BrownShibaDog`_)
* Upgrade python-prompt-toolkit to v3.0. (Thanks: `laixintao`_)
2.2.0:

View File

@ -9,7 +9,7 @@ install_requirements = [
"pgspecial>=1.11.8",
"click >= 4.1",
"Pygments >= 2.0", # Pygments has to be Capitalcased. WTF?
"prompt_toolkit>=2.0.6,<3.0.0",
"prompt_toolkit>=3.0.0,<4.0.0",
"psycopg2 >= 2.8",
"sqlparse >=0.3.0,<0.4",
"configobj >= 5.0.6",

View File

@ -20,6 +20,7 @@ def before_all(context):
os.environ["PAGER"] = "cat"
os.environ["EDITOR"] = "ex"
os.environ["VISUAL"] = "ex"
os.environ["PROMPT_TOOLKIT_NO_CPR"] = "1"
context.package_root = os.path.abspath(
os.path.dirname(os.path.dirname(os.path.dirname(__file__)))

View File

@ -91,7 +91,6 @@ def step_send_partial_select_command(context):
@then("we see error message")
def step_see_error_message(context):
wrappers.expect_exact(context, 'column "a" does not exist', timeout=2)
wrappers.wait_prompt(context)
@when("we send source command")