From 7486b0ddeccb24bec86d3e16a6cf0d86e9fb71c1 Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Mon, 19 Nov 2018 12:54:37 +0800 Subject: [PATCH] fix(Mac): fix unittest of macos test=develop --- .gitignore | 1 + paddle/fluid/pybind/pybind.cc | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index fa0c88826..4f3a30465 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +python/paddle/fluid/tests/unittests/reader_reset_test.recordio paddle/operators/check_t.save paddle/operators/check_tensor.ls paddle/operators/tensor.save diff --git a/paddle/fluid/pybind/pybind.cc b/paddle/fluid/pybind/pybind.cc index 0d059d8ae..d85480e60 100644 --- a/paddle/fluid/pybind/pybind.cc +++ b/paddle/fluid/pybind/pybind.cc @@ -357,6 +357,9 @@ All parameter, weight, gradient are variables in Paddle. return self.GetMutable(); }, py::return_value_policy::reference) + +#endif +#ifndef _WIN32 .def("get_reader", [](Variable &self) -> framework::ReaderHolder * { PADDLE_ENFORCE(self.IsType()); @@ -364,7 +367,7 @@ All parameter, weight, gradient are variables in Paddle. }, py::return_value_policy::reference) #endif - ; + ; // NOLINT #if !defined(_WIN32) py::class_(m, "Reader", "") -- GitLab