Skip to content

Commit c488c43

Browse files
committed
TST: use --tb=short with pytest
COMPAT: skip tests for numpy >= 1.12 with pow and integer inputs closes pandas-dev#15363
1 parent 7713f29 commit c488c43

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
.noseids
2020
.ipynb_checkpoints
2121
.tags
22+
.cache/
2223

2324
# Compiled source #
2425
###################

ci/script.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ fi
2020
if [ "$BUILD_TEST" ]; then
2121
echo "We are not running nosetests as this is simply a build test."
2222
elif [ "$COVERAGE" ]; then
23-
echo pytest -s --cov=pandas --cov-report xml:/tmp/nosetests.xml $TEST_ARGS pandas
24-
pytest -s --cov=pandas --cov-report xml:/tmp/nosetests.xml $TEST_ARGS pandas
23+
echo pytest -s --cov=pandas --cov-report xml:/tmp/nosetests.xml $TEST_ARGS --tb=short pandas
24+
pytest -s --cov=pandas --cov-report xml:/tmp/nosetests.xml $TEST_ARGS --tb=short pandas
2525
else
26-
echo pytest $TEST_ARGS pandas
27-
pytest $TEST_ARGS pandas # TODO: doctest
26+
echo pytest $TEST_ARGS --tb=short pandas
27+
pytest $TEST_ARGS --tb=short pandas # TODO: doctest
2828
fi
2929

3030
RET="$?"

pandas/tests/test_expressions.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
from pandas.core.api import DataFrame, Panel
1414
from pandas.computation import expressions as expr
15-
from pandas import compat
15+
from pandas import compat, _np_version_under1p12
1616
from pandas.util.testing import (assert_almost_equal, assert_series_equal,
1717
assert_frame_equal, assert_panel_equal,
1818
assert_panel4d_equal, slow)
@@ -282,6 +282,12 @@ def testit():
282282
'evaluate')
283283
self.assertNotEqual(result, f._is_mixed_type)
284284

285+
# numpy >= 1.12 doesn't handle integers
286+
# raised to integer powers
287+
# https://github.com/pandas-dev/pandas/issues/15363
288+
if op == 'pow' and not _np_version_under1p12:
289+
continue
290+
285291
result = expr.evaluate(op, op_str, f, f,
286292
use_numexpr=True)
287293
expected = expr.evaluate(op, op_str, f, f,

0 commit comments

Comments
 (0)