pybind11/tests
Ralf W. Grosse-Kunstleve bf8d6a2900 First fully successful attempt to make shared_from_this and trampolines play nicely.
Now also passes the open_spiel iterated_prisoners_dilemma_test ASAN clean, in addition to all pybind11 and PyCLIF unit tests.

The problem was that calling `std::shared_ptr<void>::reset()` with a `void` pointer cannot possibly update the `shared_from_this` `weak_ptr`.

The solution is to store a `shd_ptr_reset` function pointer in `guarded_deleter` (similar in idea to the stored function pointer for calling `delete`).

This commit still includes all debugging code, i.e. is "dirty". The code will be cleaned up after the GitHub CI is fully successful.
2021-06-30 07:04:31 -07:00
..
extra_python_package Splitting out include/pybind11/detail/pragma_warning_block.h (#2988) 2021-05-03 22:08:04 -07:00
extra_setuptools feat: parallel compiler (#2521) 2020-10-02 10:03:35 -04:00
pure_cpp More clang-tidy fixes. These escaped before because -DDOWNLOAD_EIGEN=ON -DDOWNLOAD_CATCH=ON -DCMAKE_CXX_STANDARD=17, as used in the GitHub Actions, were missing in the interactive run. 2021-06-22 14:42:47 -07:00
test_cmake_build fix: support basic dual includes (#2804) 2021-01-19 18:49:03 -05:00
test_embed fix(clang-tidy): performance fixes applied in tests and CI (#3051) 2021-06-22 12:11:54 -04:00
class_sh_module_local_0.cpp Adding py::smart_holder (for smart-pointer interoperability). (#2672) 2021-02-23 21:50:42 -08:00
class_sh_module_local_1.cpp Adding py::smart_holder (for smart-pointer interoperability). (#2672) 2021-02-23 21:50:42 -08:00
class_sh_module_local_2.cpp Adding py::smart_holder (for smart-pointer interoperability). (#2672) 2021-02-23 21:50:42 -08:00
CMakeLists.txt First fully successful attempt to make shared_from_this and trampolines play nicely. 2021-06-30 07:04:31 -07:00
conftest.py style: use Black everywhere (#2594) 2020-10-16 16:38:13 -04:00
constructor_stats.h refactor: module -> module_ with typedef (#2544) 2020-10-03 13:38:03 -04:00
cross_module_gil_utils.cpp Make sure detail::get_internals acquires the GIL before making Python calls. (#1836) 2019-07-15 16:47:02 +02:00
env.py env: Add surrogate for pytest.deprecated_call for ptyest<3.9 (#2923) 2021-04-02 14:34:09 -04:00
local_bindings.h fix(clang-tidy): performance fixes applied in tests and CI (#3051) 2021-06-22 12:11:54 -04:00
object.h fix(clang-tidy): performance fixes applied in tests and CI (#3051) 2021-06-22 12:11:54 -04:00
pybind11_cross_module_tests.cpp fix(clang-tidy): performance fixes applied in tests and CI (#3051) 2021-06-22 12:11:54 -04:00
pybind11_tests.cpp refactor: module -> module_ with typedef (#2544) 2020-10-03 13:38:03 -04:00
pybind11_tests.h Ignore deprecation warnings about old-style __init__/__setstate__ constructors in the tests (originally done in #2746) (#2759) 2021-01-01 17:37:28 +01:00
pytest.ini Make sure all warnings in pytest get turned into errors (#2838) 2021-02-01 14:52:20 +01:00
requirements.txt tests: use master commit for pytest on 3.10 (#2967) 2021-04-21 13:30:01 -04:00
test_async.cpp refactor: module -> module_ with typedef (#2544) 2020-10-03 13:38:03 -04:00
test_async.py tests: cleanup and ci hardening (#2397) 2020-08-16 16:02:12 -04:00
test_buffers.cpp fix(clang-tidy): performance fixes applied in tests and CI (#3051) 2021-06-22 12:11:54 -04:00
test_buffers.py Fix various minor memory leaks in the tests (found by Valgrind in #2746) (#2758) 2021-01-01 17:05:22 +01:00
test_builtin_casters.cpp fix(clang-tidy): performance fixes applied in tests and CI (#3051) 2021-06-22 12:11:54 -04:00
test_builtin_casters.py env: Add surrogate for pytest.deprecated_call for ptyest<3.9 (#2923) 2021-04-02 14:34:09 -04:00
test_call_policies.cpp functions: Add doc on incorrect argument index (#2979) 2021-05-06 10:13:30 -04:00
test_call_policies.py functions: Add doc on incorrect argument index (#2979) 2021-05-06 10:13:30 -04:00
test_callbacks.cpp fix(clang-tidy): performance fixes applied in tests and CI (#3051) 2021-06-22 12:11:54 -04:00
test_callbacks.py Allow function pointer extraction from overloaded functions (#2944) 2021-04-13 16:53:56 -07:00
test_chrono.cpp fix: allow assignment of time points of resolutions other than that of a system clock (#2481) 2020-09-13 10:24:00 -04:00
test_chrono.py Use correct duration representation when casting from datetime.timdelta to std::chrono::duration (#2870) 2021-03-07 23:42:01 -08:00
test_class_sh_basic.cpp Applying clang-tidy fixes needed after merging PR #3051 (mostly automatically). 2021-06-22 13:38:30 -07:00
test_class_sh_basic.py Missing cast from const unique_ptr& (#2904) 2021-03-16 18:10:12 -07:00
test_class_sh_disowning_mi.cpp [smart_holder] clang-tidy fixes (related to recent clang-tidy changes on master). (#3053) 2021-06-21 12:40:10 -07:00
test_class_sh_disowning_mi.py Adding reclaim_disowned logic & miscellaneous naming and documentation improvements. (#2943) 2021-04-09 23:08:44 -07:00
test_class_sh_disowning.cpp Adding tests to exercise corner cases involving disowning. (#2912) 2021-03-22 12:16:29 -07:00
test_class_sh_disowning.py Adding reclaim_disowned logic & miscellaneous naming and documentation improvements. (#2943) 2021-04-09 23:08:44 -07:00
test_class_sh_factory_constructors.cpp Adding tests to exercise corner cases involving disowning. (#2912) 2021-03-22 12:16:29 -07:00
test_class_sh_factory_constructors.py Adding py::smart_holder (for smart-pointer interoperability). (#2672) 2021-02-23 21:50:42 -08:00
test_class_sh_inheritance.cpp Applying clang-tidy fixes needed after merging PR #3051 (mostly automatically). 2021-06-22 13:38:30 -07:00
test_class_sh_inheritance.py Adding py::smart_holder (for smart-pointer interoperability). (#2672) 2021-02-23 21:50:42 -08:00
test_class_sh_module_local.py Adding py::smart_holder (for smart-pointer interoperability). (#2672) 2021-02-23 21:50:42 -08:00
test_class_sh_shared_from_this.cpp MSVC 2015 compatibility. 2021-06-30 07:04:31 -07:00
test_class_sh_shared_from_this.py Adding shared_ptr_reset_and_rescue_pointee_model_proof_of_concept. 2021-06-30 07:04:31 -07:00
test_class_sh_shared_ptr_copy_move.cpp SH, attribute and property tests 2021-06-29 05:57:32 -07:00
test_class_sh_shared_ptr_copy_move.py SM, remove type annotations in test 2021-06-29 05:57:32 -07:00
test_class_sh_trampoline_basic.cpp Applying clang-tidy fixes needed after merging PR #3051 (mostly automatically). 2021-06-22 13:38:30 -07:00
test_class_sh_trampoline_basic.py Adding reclaim_disowned logic & miscellaneous naming and documentation improvements. (#2943) 2021-04-09 23:08:44 -07:00
test_class_sh_trampoline_self_life_support.cpp Applying clang-tidy fixes needed after merging PR #3051 (mostly automatically). 2021-06-22 13:38:30 -07:00
test_class_sh_trampoline_self_life_support.py Bug fix: trampoline_self_life_support CpCtor, MvCtor. (#2947) 2021-04-13 05:34:46 -07:00
test_class_sh_trampoline_shared_from_this.cpp First fully successful attempt to make shared_from_this and trampolines play nicely. 2021-06-30 07:04:31 -07:00
test_class_sh_trampoline_shared_from_this.py First fully successful attempt to make shared_from_this and trampolines play nicely. 2021-06-30 07:04:31 -07:00
test_class_sh_trampoline_shared_ptr_cpp_arg.cpp Applying clang-tidy fixes needed after merging PR #3051 (mostly automatically). 2021-06-22 13:38:30 -07:00
test_class_sh_trampoline_shared_ptr_cpp_arg.py Using dynamic_cast<AliasType> to determine pointee_depends_on_holder_owner. (#2910) 2021-03-19 12:18:39 -07:00
test_class_sh_trampoline_unique_ptr.cpp Adding reclaim_disowned logic & miscellaneous naming and documentation improvements. (#2943) 2021-04-09 23:08:44 -07:00
test_class_sh_trampoline_unique_ptr.py Adding reclaim_disowned logic & miscellaneous naming and documentation improvements. (#2943) 2021-04-09 23:08:44 -07:00
test_class_sh_unique_ptr_member.cpp Fixing clang-tidy error (related to PR #3049). (#3050) 2021-06-19 16:51:09 -07:00
test_class_sh_unique_ptr_member.py Changing cast_error("... Python instance was disowned.") to value_error (which changes RuntimeError to ValueError). (#2880) 2021-02-26 23:19:23 -08:00
test_class_sh_virtual_py_cpp_mix.cpp Adding reclaim_disowned logic & miscellaneous naming and documentation improvements. (#2943) 2021-04-09 23:08:44 -07:00
test_class_sh_virtual_py_cpp_mix.py Using dynamic_cast<AliasType> to determine pointee_depends_on_holder_owner. (#2910) 2021-03-19 12:18:39 -07:00
test_class.cpp Manually fixing merge conflict. 2021-06-22 12:19:40 -07:00
test_class.py fix: test_factory_constructors.py failure triggered by test_register_duplicate_class (#2564) 2020-10-16 16:38:51 -04:00
test_classh_mock.cpp Bug fix: adding back !is_alias<Class>(ptr) that were accidentally omitted. (#2958) 2021-04-19 10:54:37 -07:00
test_classh_mock.py Bug fix: adding back !is_alias<Class>(ptr) that were accidentally omitted. (#2958) 2021-04-19 10:54:37 -07:00
test_constants_and_functions.cpp fix(clang-tidy): performance fixes applied in tests and CI (#3051) 2021-06-22 12:11:54 -04:00
test_constants_and_functions.py Plug leaking function_records in cpp_function initialization in case of exceptions (found by Valgrind in #2746) (#2756) 2021-01-14 19:34:32 +01:00
test_copy_move.cpp fix(clang-tidy): performance fixes applied in tests and CI (#3051) 2021-06-22 12:11:54 -04:00
test_copy_move.py Fix various minor memory leaks in the tests (found by Valgrind in #2746) (#2758) 2021-01-01 17:05:22 +01:00
test_custom_type_casters.cpp fix(clang-tidy): performance fixes applied in tests and CI (#3051) 2021-06-22 12:11:54 -04:00
test_custom_type_casters.py style: use Black everywhere (#2594) 2020-10-16 16:38:13 -04:00
test_docstring_options.cpp fix: do not set docstring for function when empty (#2745) 2020-12-27 22:56:30 -05:00
test_docstring_options.py fix: do not set docstring for function when empty (#2745) 2020-12-27 22:56:30 -05:00
test_eigen.cpp fix(clang-tidy): performance fixes applied in tests and CI (#3051) 2021-06-22 12:11:54 -04:00
test_eigen.py style: use Black everywhere (#2594) 2020-10-16 16:38:13 -04:00
test_enum.cpp Avoid conversion to int_ rhs argument of enum eq/ne (#1912) 2019-09-19 18:23:27 +02:00
test_enum.py enum: add missing Enum.value property (#2739) 2020-12-31 11:08:15 -05:00
test_eval_call.py style: use Black everywhere (#2594) 2020-10-16 16:38:13 -04:00
test_eval.cpp fix(clang-tidy): performance fixes applied in tests and CI (#3051) 2021-06-22 12:11:54 -04:00
test_eval.py Add __builtins__ to globals argument of py::exec and py::eval if not present (#2616) 2020-10-27 19:58:27 +01:00
test_exceptions.cpp fix(clang-tidy): performance fixes applied in tests and CI (#3051) 2021-06-22 12:11:54 -04:00
test_exceptions.h Explicitly export exception types. (#2999) 2021-05-27 08:00:18 -07:00
test_exceptions.py Explicitly export exception types. (#2999) 2021-05-27 08:00:18 -07:00
test_factory_constructors.cpp Manually fixing merge conflict. 2021-06-22 12:19:40 -07:00
test_factory_constructors.py Bug fix: adding back !is_alias<Class>(ptr) that were accidentally omitted. (#2958) 2021-04-19 10:54:37 -07:00
test_gil_scoped.cpp fix(clang-tidy): performance fixes applied in tests and CI (#3051) 2021-06-22 12:11:54 -04:00
test_gil_scoped.py style: use Black everywhere (#2594) 2020-10-16 16:38:13 -04:00
test_iostream.cpp fix(clang-tidy): performance fixes applied in tests and CI (#3051) 2021-06-22 12:11:54 -04:00
test_iostream.py Fix Unicode support for ostream redirects (#2982) 2021-05-03 22:04:38 -07:00
test_kwargs_and_defaults.cpp fix(clang-tidy): performance fixes applied in tests and CI (#3051) 2021-06-22 12:11:54 -04:00
test_kwargs_and_defaults.py style: use Black everywhere (#2594) 2020-10-16 16:38:13 -04:00
test_local_bindings.cpp fix(clang-tidy): performance fixes applied in tests and CI (#3051) 2021-06-22 12:11:54 -04:00
test_local_bindings.py minor cleanup: fixing or silencing flake8 errors (#2731) 2020-12-18 19:41:43 -05:00
test_methods_and_attributes.cpp fix: enable py::implicitly_convertible<py::none, ...> for py::class_-wrapped types (#3059) 2021-06-25 21:57:45 -07:00
test_methods_and_attributes.py fix: enable py::implicitly_convertible<py::none, ...> for py::class_-wrapped types (#3059) 2021-06-25 21:57:45 -07:00
test_modules.cpp fix(clang-tidy): clang-tidy readability and misc fixes, like adding const (#3052) 2021-06-21 10:37:48 -04:00
test_modules.py Force the builtin module key to be the correct type. (#2814) 2021-01-24 09:17:28 -08:00
test_multiple_inheritance.cpp Manually fixing merge conflict. 2021-06-22 12:19:40 -07:00
test_multiple_inheritance.py style: use Black everywhere (#2594) 2020-10-16 16:38:13 -04:00
test_numpy_array.cpp fix(clang-tidy): performance fixes applied in tests and CI (#3051) 2021-06-22 12:11:54 -04:00
test_numpy_array.py Add const T to docstring generation. (#3020) 2021-06-08 11:56:45 -07:00
test_numpy_dtypes.cpp fix(clang-tidy): performance fixes applied in tests and CI (#3051) 2021-06-22 12:11:54 -04:00
test_numpy_dtypes.py Dtype kind vs char (#2864) 2021-02-23 10:57:28 +01:00
test_numpy_vectorize.cpp fix(clang-tidy): performance fixes applied in tests and CI (#3051) 2021-06-22 12:11:54 -04:00
test_numpy_vectorize.py style: use Black everywhere (#2594) 2020-10-16 16:38:13 -04:00
test_opaque_types.cpp fix(clang-tidy): performance fixes applied in tests and CI (#3051) 2021-06-22 12:11:54 -04:00
test_opaque_types.py style: use Black everywhere (#2594) 2020-10-16 16:38:13 -04:00
test_operator_overloading.cpp fix(clang-tidy): performance fixes applied in tests and CI (#3051) 2021-06-22 12:11:54 -04:00
test_operator_overloading.py style: use Black everywhere (#2594) 2020-10-16 16:38:13 -04:00
test_pickling.cpp fix(clang-tidy): performance fixes applied in tests and CI (#3051) 2021-06-22 12:11:54 -04:00
test_pickling.py style: use Black everywhere (#2594) 2020-10-16 16:38:13 -04:00
test_pytypes.cpp fix(clang-tidy): performance fixes applied in tests and CI (#3051) 2021-06-22 12:11:54 -04:00
test_pytypes.py Add pybind11::bytearray (#2799) 2021-02-14 15:51:13 +01:00
test_sequences_and_iterators.cpp fix(clang-tidy): performance fixes applied in tests and CI (#3051) 2021-06-22 12:11:54 -04:00
test_sequences_and_iterators.py style: use Black everywhere (#2594) 2020-10-16 16:38:13 -04:00
test_smart_ptr.cpp SH, update shared_ptr copy tests 2021-06-29 05:57:32 -07:00
test_smart_ptr.py Restoring init_holder overload for std::enable_shared_from_this and original tests/test_smart_ptr.py. 2021-06-30 07:04:31 -07:00
test_stl_binders.cpp fix(clang-tidy): clang-tidy readability and misc fixes, like adding const (#3052) 2021-06-21 10:37:48 -04:00
test_stl_binders.py style: use Black everywhere (#2594) 2020-10-16 16:38:13 -04:00
test_stl.cpp fix(clang-tidy): performance fixes applied in tests and CI (#3051) 2021-06-22 12:11:54 -04:00
test_stl.py style: use Black everywhere (#2594) 2020-10-16 16:38:13 -04:00
test_tagbased_polymorphic.cpp style: clang-tidy: llvm-namespace-comment 2020-09-15 09:56:59 -04:00
test_tagbased_polymorphic.py style: use Black everywhere (#2594) 2020-10-16 16:38:13 -04:00
test_union.cpp Fix assertion failure for unions (#1685) (#1709) 2019-06-11 23:28:58 +02:00
test_union.py ci: GHA basic format & pre-commit (#2309) 2020-07-20 13:35:21 -04:00
test_virtual_functions.cpp fix(clang-tidy): performance fixes applied in tests and CI (#3051) 2021-06-22 12:11:54 -04:00
test_virtual_functions.py Add a Valgrind build on debug Python 3.9 (#2746) 2021-01-15 21:07:31 +01:00
valgrind-numpy-scipy.supp Adjusting valgrind suppression for pypocketfft to resolve systematic failures that started to appear on 2020-05-27. (#3022) 2021-05-27 12:51:46 -07:00
valgrind-python.supp chore: get PyPy 3.7 wheels using NumPy 1.20 (#2837) 2021-01-31 17:29:09 -05:00