From cd2d3ad5df688e7df208896ace31364350488b7e Mon Sep 17 00:00:00 2001 From: Dean Moldovan Date: Sat, 24 Jun 2017 21:00:18 +0200 Subject: [PATCH] Fix embedded threads test on MSVC2015 / Python 2.7 --- tests/test_embed/test_interpreter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_embed/test_interpreter.cpp b/tests/test_embed/test_interpreter.cpp index 2d5823c39..acbad6bec 100644 --- a/tests/test_embed/test_interpreter.cpp +++ b/tests/test_embed/test_interpreter.cpp @@ -205,7 +205,7 @@ TEST_CASE("Threads") { for (auto i = 0; i < num_threads; ++i) { threads.emplace_back([&]() { py::gil_scoped_acquire gil{}; - py::exec("count += 1", py::globals(), locals); + locals["count"] = locals["count"].cast() + 1; }); }