Skip to content

Commit 38fdea3

Browse files
committed
Rename test_make_caster_adl to test_select_caster
1 parent 06571a4 commit 38fdea3

7 files changed

+17
-8
lines changed

Diff for: docs/advanced/cast/custom.rst

+2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ C++ to Python.
3434
3535
The necessary conversion routines are defined by a caster class, which
3636
is then "plugged into" pybind11 using one of two alternative mechanisms.
37+
3738
Starting with the example caster class:
3839

3940
.. code-block:: cpp
@@ -66,6 +67,7 @@ Starting with the example caster class:
6667
}
6768
return true;
6869
}
70+
6971
// C++ -> Python: convert an inty instance into a Python object. The second and third arguments
7072
// are used to indicate the return value policy and parent object (for
7173
// return_value_policy::reference_internal) and are often ignored by custom casters.

Diff for: tests/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,6 @@ set(PYBIND11_TEST_FILES
138138
test_iostream
139139
test_kwargs_and_defaults
140140
test_local_bindings
141-
test_make_caster_adl
142-
test_make_caster_adl_alt
143141
test_methods_and_attributes
144142
test_modules
145143
test_multiple_inheritance
@@ -150,6 +148,8 @@ set(PYBIND11_TEST_FILES
150148
test_operator_overloading
151149
test_pickling
152150
test_pytypes
151+
test_select_caster
152+
test_select_caster_alt
153153
test_sequences_and_iterators
154154
test_smart_ptr
155155
test_stl

Diff for: tests/test_docs_advanced_cast_custom.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ struct inty_type_caster {
6464
}
6565
return true;
6666
}
67+
6768
// C++ -> Python: convert an inty instance into a Python object. The second and third arguments
6869
// are used to indicate the return value policy and parent object (for
6970
// return_value_policy::reference_internal) and are often ignored by custom casters.

Diff for: tests/test_make_caster_adl.cpp renamed to tests/test_select_caster.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
// adl = Argument Dependent Lookup
1+
// Copyright (c) 2022 The Pybind Development Team.
2+
// All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
24

35
#include "pybind11_tests.h"
46

@@ -73,7 +75,7 @@ struct minimal_real_caster {
7375

7476
} // namespace mrc_ns
7577

76-
TEST_SUBMODULE(make_caster_adl, m) {
78+
TEST_SUBMODULE(select_caster, m) {
7779
m.def("have_a_ns_num", []() { return py::detail::make_caster<have_a_ns::type_mock>::num(); });
7880
m.def("global_ns_num", []() { return py::detail::make_caster<global_ns_type_mock>::num(); });
7981
m.def("unnamed_ns_num", []() { return py::detail::make_caster<unnamed_ns_type_mock>::num(); });

Diff for: tests/test_make_caster_adl.py renamed to tests/test_select_caster.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import pytest
22

3-
from pybind11_tests import make_caster_adl as m
4-
from pybind11_tests import make_caster_adl_alt as m_alt
3+
from pybind11_tests import select_caster as m
4+
from pybind11_tests import select_caster_alt as m_alt
55

66

77
def test_mock_casters():

Diff for: tests/test_make_caster_adl_alt.cpp renamed to tests/test_select_caster_alt.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Copyright (c) 2022 The Pybind Development Team.
2+
// All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
15
#include "pybind11_tests.h"
26

37
namespace have_a_ns {
@@ -10,6 +14,6 @@ struct type_mock {
1014

1115
} // namespace have_a_ns
1216

13-
TEST_SUBMODULE(make_caster_adl_alt, m) {
17+
TEST_SUBMODULE(select_caster_alt, m) {
1418
m.def("have_a_ns_num", []() { return py::detail::make_caster<have_a_ns::type_mock>::num(); });
1519
}

Diff for: tests/test_make_caster_adl_alt.py renamed to tests/test_select_caster_alt.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from pybind11_tests import make_caster_adl_alt as m
1+
from pybind11_tests import select_caster_alt as m
22

33

44
def test_mock_casters():

0 commit comments

Comments
 (0)