summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSatoshi Kobayashi <satoshi-k@stratosphere.co.jp>2015-04-13 16:32:09 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-04-14 05:31:42 +0900
commitfad258d458f5e2099c6facf092d1d51eaebae55d (patch)
tree12ea04765325210c5aae69cb3e9d511ac8a48e4e
parent67e3821c94fa5d10c31a94378a867c59b3d6a7a8 (diff)
'reduce' has been renamed to 'functools.reduce' in Python 3
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/tests/unit/ofproto/test_parser_ofpmatch.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/ryu/tests/unit/ofproto/test_parser_ofpmatch.py b/ryu/tests/unit/ofproto/test_parser_ofpmatch.py
index d801f8ab..8400e1b7 100644
--- a/ryu/tests/unit/ofproto/test_parser_ofpmatch.py
+++ b/ryu/tests/unit/ofproto/test_parser_ofpmatch.py
@@ -14,6 +14,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+try:
+ # Python 3
+ from functools import reduce
+except ImportError:
+ # Python 2
+ pass
+
import sys
import unittest
from nose.tools import eq_