Skip to content

MAINT: Blacklist np.array_equal in tests #18318

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

Merged
merged 3 commits into from
Nov 16, 2017
Merged
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
8 changes: 7 additions & 1 deletion ci/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,13 @@ if [ "$LINT" ]; then
echo "Linting *.c and *.h DONE"

echo "Check for invalid testing"
grep -r -E --include '*.py' --exclude testing.py '(numpy|np)\.testing' pandas

# Check for the following code in testing:
#
# np.testing
# np.array_equal
grep -r -E --include '*.py' --exclude testing.py '(numpy|np)(\.testing|\.array_equal)' pandas/tests/

if [ $? = "0" ]; then
RET=1
fi
Expand Down
23 changes: 0 additions & 23 deletions pandas/tests/internals/test_internals.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,29 +286,6 @@ def test_delete(self):
with pytest.raises(Exception):
newb.delete(3)

def test_split_block_at(self):

# with dup column support this method was taken out
# GH3679
pytest.skip("skipping for now")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no problem removing, though his should in theory work now

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test doesn't work period. The function "split_block_at" doesn't exist anywhere.


bs = list(self.fblock.split_block_at('a'))
assert len(bs) == 1
assert np.array_equal(bs[0].items, ['c', 'e'])

bs = list(self.fblock.split_block_at('c'))
assert len(bs) == 2
assert np.array_equal(bs[0].items, ['a'])
assert np.array_equal(bs[1].items, ['e'])

bs = list(self.fblock.split_block_at('e'))
assert len(bs) == 1
assert np.array_equal(bs[0].items, ['a', 'c'])

# bblock = get_bool_ex(['f'])
# bs = list(bblock.split_block_at('f'))
# assert len(bs), 0)


class TestDatetimeBlock(object):

Expand Down