Skip to content

Commit a26b676

Browse files
authored
MAINT: Blacklist np.array_equal in tests (#18318)
Follow-up to gh-18087. The remaining test that uses the function call uses functionality that doesn't exist anymore in pandas.
1 parent dd38eea commit a26b676

File tree

2 files changed

+7
-24
lines changed

2 files changed

+7
-24
lines changed

ci/lint.sh

+7-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,13 @@ if [ "$LINT" ]; then
7272
echo "Linting *.c and *.h DONE"
7373

7474
echo "Check for invalid testing"
75-
grep -r -E --include '*.py' --exclude testing.py '(numpy|np)\.testing' pandas
75+
76+
# Check for the following code in testing:
77+
#
78+
# np.testing
79+
# np.array_equal
80+
grep -r -E --include '*.py' --exclude testing.py '(numpy|np)(\.testing|\.array_equal)' pandas/tests/
81+
7682
if [ $? = "0" ]; then
7783
RET=1
7884
fi

pandas/tests/internals/test_internals.py

-23
Original file line numberDiff line numberDiff line change
@@ -286,29 +286,6 @@ def test_delete(self):
286286
with pytest.raises(Exception):
287287
newb.delete(3)
288288

289-
def test_split_block_at(self):
290-
291-
# with dup column support this method was taken out
292-
# GH3679
293-
pytest.skip("skipping for now")
294-
295-
bs = list(self.fblock.split_block_at('a'))
296-
assert len(bs) == 1
297-
assert np.array_equal(bs[0].items, ['c', 'e'])
298-
299-
bs = list(self.fblock.split_block_at('c'))
300-
assert len(bs) == 2
301-
assert np.array_equal(bs[0].items, ['a'])
302-
assert np.array_equal(bs[1].items, ['e'])
303-
304-
bs = list(self.fblock.split_block_at('e'))
305-
assert len(bs) == 1
306-
assert np.array_equal(bs[0].items, ['a', 'c'])
307-
308-
# bblock = get_bool_ex(['f'])
309-
# bs = list(bblock.split_block_at('f'))
310-
# assert len(bs), 0)
311-
312289

313290
class TestDatetimeBlock(object):
314291

0 commit comments

Comments
 (0)