From fad258d458f5e2099c6facf092d1d51eaebae55d Mon Sep 17 00:00:00 2001 From: Satoshi Kobayashi Date: Mon, 13 Apr 2015 16:32:09 +0900 Subject: [PATCH] 'reduce' has been renamed to 'functools.reduce' in Python 3 Signed-off-by: FUJITA Tomonori --- ryu/tests/unit/ofproto/test_parser_ofpmatch.py | 7 +++++++ 1 file changed, 7 insertions(+) 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_