Skip to content

Commit 1742c21

Browse files
author
Braden Dubois
committed
reworked test
1 parent 9680e85 commit 1742c21

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

tests/test_stl_binders.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
BSD-style license that can be found in the LICENSE file.
88
*/
99

10+
#include <pybind11/attr.h>
1011
#include <pybind11/numpy.h>
1112
#include <pybind11/stl_bind.h>
1213

@@ -186,6 +187,7 @@ TEST_SUBMODULE(stl_binders, m) {
186187

187188
// test_set_int
188189
py::bind_set<std::set<int>>(m, "SetInt");
190+
// py::implicitly_convertible<py::set, std::set<int>>();
189191

190192
// test_map_string_double
191193
py::bind_map<std::map<std::string, double>>(m, "MapStringDouble");

tests/test_stl_binders.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,12 @@ def test_set_int():
153153
s_a = m.SetInt()
154154
s_b = m.SetInt()
155155

156-
assert len(s_a) == 0
157156
assert s_a == s_b
158157

159158
s_a.add(1)
160159

161160
assert 1 in s_a
161+
assert len(s_a) == 1
162162
assert str(s_a) == "SetInt{1}"
163163
assert s_a != s_b
164164

0 commit comments

Comments
 (0)