mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +00:00
Change NAMESPACE_* macros into PYBIND11_NAMESPACE_* (#2283)
* Change NAMESPACE_BEGIN and NAMESPACE_END macros into PYBIND11_NAMESPACE_BEGIN and PYBIND11_NAMESPACE_END * Fix sudden HomeBrew 'python not installed' error * Sweep difference in 'Class.__init__() must be called when overriding __init__' error message between CPython and PyPy under the rug * Homebrew updated to 3.8 yesterday. Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
This commit is contained in:
@@ -109,7 +109,10 @@ def test_inheritance_init(msg):
|
||||
pass
|
||||
with pytest.raises(TypeError) as exc_info:
|
||||
Python()
|
||||
assert msg(exc_info.value) == "m.class_.Pet.__init__() must be called when overriding __init__"
|
||||
expected = ["m.class_.Pet.__init__() must be called when overriding __init__",
|
||||
"Pet.__init__() must be called when overriding __init__"] # PyPy?
|
||||
# TODO: fix PyPy error message wrt. tp_name/__qualname__?
|
||||
assert msg(exc_info.value) in expected
|
||||
|
||||
# Multiple bases
|
||||
class RabbitHamster(m.Rabbit, m.Hamster):
|
||||
@@ -118,8 +121,9 @@ def test_inheritance_init(msg):
|
||||
|
||||
with pytest.raises(TypeError) as exc_info:
|
||||
RabbitHamster()
|
||||
expected = "m.class_.Hamster.__init__() must be called when overriding __init__"
|
||||
assert msg(exc_info.value) == expected
|
||||
expected = ["m.class_.Hamster.__init__() must be called when overriding __init__",
|
||||
"Hamster.__init__() must be called when overriding __init__"] # PyPy
|
||||
assert msg(exc_info.value) in expected
|
||||
|
||||
|
||||
def test_automatic_upcasting():
|
||||
|
||||
Reference in New Issue
Block a user