diff options
Diffstat (limited to 'python/google/protobuf/internal/unknown_fields_test.py')
-rwxr-xr-x | python/google/protobuf/internal/unknown_fields_test.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/python/google/protobuf/internal/unknown_fields_test.py b/python/google/protobuf/internal/unknown_fields_test.py index 25b447e1..9685b8b4 100755 --- a/python/google/protobuf/internal/unknown_fields_test.py +++ b/python/google/protobuf/internal/unknown_fields_test.py @@ -35,7 +35,10 @@ __author__ = 'bohdank@google.com (Bohdan Koval)' -import unittest +try: + import unittest2 as unittest +except ImportError: + import unittest from google.protobuf import unittest_mset_pb2 from google.protobuf import unittest_pb2 from google.protobuf import unittest_proto3_arena_pb2 @@ -48,7 +51,7 @@ from google.protobuf.internal import type_checkers def SkipIfCppImplementation(func): - return test_util.skipIf( + return unittest.skipIf( api_implementation.Type() == 'cpp' and api_implementation.Version() == 2, 'C++ implementation does not expose unknown fields to Python')(func) |