Skip to content
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

Implicit conversions to bool + np.bool_ conversion #925

Merged
merged 17 commits into from
Jul 23, 2017
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
(Update the tests)
aldanor committed Jul 23, 2017
commit a5ddfbb071745ebdd0f8468c2591fbb4962ecea8
14 changes: 0 additions & 14 deletions tests/test_numpy_dtypes.py
Original file line number Diff line number Diff line change
@@ -348,20 +348,6 @@ def cant_convert(v):
require_implicit(None)
assert convert(None) is False

# Sequence types check for lengths (same as in PyObject_IsTrue)
require_implicit([])
require_implicit(())
require_implicit('')
require_implicit({})
assert convert([]) is False
assert convert([1]) is True
assert convert(()) is False
assert convert((0,)) is True
assert convert('') is False
assert convert('foo') is True
assert convert({}) is False
assert convert({1: 2}) is True

class A(object):
def __init__(self, x):
self.x = x