mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-11 16:13:53 +00:00
Fixing merge accident related to merging PR #3059 from master.
I did not go back to check when and why exactly this slipped in. Also removing unused `msg` (oversight in PR #3059).
This commit is contained in:
parent
c2111fd353
commit
94f0db58ee
@ -433,18 +433,7 @@ def test_accepts_none(msg):
|
|||||||
assert m.ok_none4(None) == -1
|
assert m.ok_none4(None) == -1
|
||||||
|
|
||||||
|
|
||||||
def test_casts_none(msg):
|
def test_casts_none():
|
||||||
"""#2778: implicit casting from None to object (not pointer)"""
|
|
||||||
a = m.NoneCastTester()
|
|
||||||
assert m.ok_obj_or_none(a) == -1
|
|
||||||
a = m.NoneCastTester(4)
|
|
||||||
assert m.ok_obj_or_none(a) == 4
|
|
||||||
a = m.NoneCastTester(None)
|
|
||||||
assert m.ok_obj_or_none(a) == -1
|
|
||||||
assert m.ok_obj_or_none(None) == -1
|
|
||||||
|
|
||||||
|
|
||||||
def test_casts_none(msg):
|
|
||||||
"""#2778: implicit casting from None to object (not pointer)"""
|
"""#2778: implicit casting from None to object (not pointer)"""
|
||||||
a = m.NoneCastTester()
|
a = m.NoneCastTester()
|
||||||
assert m.ok_obj_or_none(a) == -1
|
assert m.ok_obj_or_none(a) == -1
|
||||||
|
Loading…
Reference in New Issue
Block a user