From e2c36eb747ae7e9e931f30659383961711fd0c84 Mon Sep 17 00:00:00 2001 From: rising-star92 Date: Wed, 29 Jul 2020 10:09:02 -0700 Subject: [PATCH] Avoid using undocumented -k syntaxes. (#1682) As `pytest 6.0.0` which was released on Jul 28, 2020 dropped undocumented -k syntaxes (https://github.com/pytest-dev/pytest/pull/7210, https://github.com/pytest-dev/pytest/pull/7122), we should use a full sentence query for the parameter: ``` ERROR: Wrong expression passed to '-k': not melt -to_delta -read_delta -to_clipboard: at column 10: expected end of input; got identifier ``` --- dev/pytest | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/pytest b/dev/pytest index a61a187..74264aa 100755 --- a/dev/pytest +++ b/dev/pytest @@ -44,12 +44,12 @@ if [ "$#" = 0 ]; then if [[ "$SPARK_VERSION" == 2.3* ]] || [[ "$SPARK_VERSION" == 2.4.1* ]] || [[ "$SPARK_VERSION" == 2.4.2* ]]; then # Delta requires Spark 2.4.2+. We skip the related doctests. if [[ "$SPARK_VERSION" == 2.3* ]]; then - $PYTHON_EXECUTABLE -m pytest --cov=databricks --cov-report xml:"$FWDIR/coverage.xml" -k " -melt -to_delta -read_delta -to_clipboard" --verbose --showlocals --color=yes --doctest-modules databricks "${logopts[@]}" + $PYTHON_EXECUTABLE -m pytest --cov=databricks --cov-report xml:"$FWDIR/coverage.xml" -k "not (melt or to_delta or read_delta or to_clipboard)" --verbose --showlocals --color=yes --doctest-modules databricks "${logopts[@]}" else - $PYTHON_EXECUTABLE -m pytest --cov=databricks --cov-report xml:"$FWDIR/coverage.xml" -k "-to_delta -read_delta -to_clipboard" --verbose --showlocals --color=yes --doctest-modules databricks "${logopts[@]}" + $PYTHON_EXECUTABLE -m pytest --cov=databricks --cov-report xml:"$FWDIR/coverage.xml" -k "not (to_delta or read_delta or to_clipboard)" --verbose --showlocals --color=yes --doctest-modules databricks "${logopts[@]}" fi else - $PYTHON_EXECUTABLE -m pytest --cov=databricks --cov-report xml:"$FWDIR/coverage.xml" -k " -to_clipboard" --verbose --showlocals --color=yes --doctest-modules databricks "${logopts[@]}" + $PYTHON_EXECUTABLE -m pytest --cov=databricks --cov-report xml:"$FWDIR/coverage.xml" -k "not to_clipboard" --verbose --showlocals --color=yes --doctest-modules databricks "${logopts[@]}" fi else $PYTHON_EXECUTABLE -m pytest "$@"