mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +00:00
Make sure all warnings in pytest get turned into errors (#2838)
* Make sure all warnings in pytest get turned into errors * Suppress DeprecationWarnings in test_int_convert and test_numpy_int_convert * PyLong_AsLong only shouts "Deprecated!" on Python>=3.8 * Fix remaining warnings on PyPy and CPython 3.10-dev
This commit is contained in:
@@ -434,8 +434,7 @@ TEST_SUBMODULE(class_, m) {
|
||||
struct SamePointer {};
|
||||
static SamePointer samePointer;
|
||||
py::class_<SamePointer, std::unique_ptr<SamePointer, py::nodelete>>(m, "SamePointer")
|
||||
.def(py::init([]() { return &samePointer; }))
|
||||
.def("__del__", [](SamePointer&) { py::print("__del__ called"); });
|
||||
.def(py::init([]() { return &samePointer; }));
|
||||
|
||||
struct Empty {};
|
||||
py::class_<Empty>(m, "Empty")
|
||||
|
||||
Reference in New Issue
Block a user