File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -138,19 +138,16 @@ TEST_F(to_object, filesystem_path) {
138138 std::filesystem::path test_path = " /tmp/" ;
139139 py::owned_ref ob = py::to_object (test_path);
140140 ASSERT_TRUE (ob);
141- # if PY_VERSION_HEX >= 0x03040000
141+
142142 py::owned_ref ns = RUN_PYTHON (R"(
143143 from pathlib import Path
144144 py_path = Path("/tmp/")
145145 )" );
146146 ASSERT_TRUE (ns);
147147
148- py::borrowed_ref py_path_ob{ PyDict_GetItemString (ns.get (), " py_path" )} ;
148+ py::borrowed_ref py_path_ob = PyDict_GetItemString (ns.get (), " py_path" );
149149 ASSERT_TRUE (py_path_ob);
150- #else
151- py::owned_ref py_path_ob = py::to_object (" /tmp/" );
152150
153- #endif
154151 int eq = PyObject_RichCompareBool (ob.get (), py_path_ob.get (), Py_EQ);
155152 EXPECT_EQ (eq, 1 );
156153}
You can’t perform that action at this time.
0 commit comments