Skip to content

TST: Parametrize simple yield tests #15406

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ci/script_multi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ if [ -n "$LOCALE_OVERRIDE" ]; then
python -c "$pycmd"
fi

# Workaround for pytest-xdist flaky collection order
# https://github.com/pytest-dev/pytest/issues/920
# https://github.com/pytest-dev/pytest/issues/1075
export PYTHONHASHSEED=$(python -c 'import random; print(random.randint(1, 4294967295))')
echo PYTHONHASHSEED=$PYTHONHASHSEED

if [ "$BUILD_TEST" ]; then
echo "We are not running pytest as this is simply a build test."
elif [ "$COVERAGE" ]; then
Expand Down
11 changes: 3 additions & 8 deletions pandas/tests/computation/test_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
import pandas.computation.expr as expr
from pandas.computation import _MIN_NUMEXPR_VERSION

ENGINES_PARSERS = list(product(_engines, expr._parsers))


def test_compat():
# test we have compat with our version of nu
Expand All @@ -30,12 +28,9 @@ def test_compat():
pytest.skip("not testing numexpr version compat")


def test_invalid_numexpr_version():
for engine, parser in ENGINES_PARSERS:
yield check_invalid_numexpr_version, engine, parser


def check_invalid_numexpr_version(engine, parser):
@pytest.mark.parametrize('engine', _engines)
@pytest.mark.parametrize('parser', expr._parsers)
def test_invalid_numexpr_version(engine, parser):
def testit():
a, b = 1, 2
res = pd.eval('a + b', engine=engine, parser=parser)
Expand Down
Loading