diff options
author | Dan O'Reilly <oreilldf@gmail.com> | 2015-08-14 22:54:53 -0400 |
---|---|---|
committer | Dan O'Reilly <oreilldf@gmail.com> | 2015-08-14 22:54:53 -0400 |
commit | 2621c8aefbfefd517a3facc6dc0e0dc45ae5eb87 (patch) | |
tree | a12a81028a9ac3b4aab2cfbbfc495e1da82c5669 /python/google/protobuf/internal/reflection_test.py | |
parent | d06adbd4a48c83aa8e9085e988020ad3bff43211 (diff) | |
download | protobuf-2621c8aefbfefd517a3facc6dc0e0dc45ae5eb87.tar.gz protobuf-2621c8aefbfefd517a3facc6dc0e0dc45ae5eb87.tar.bz2 protobuf-2621c8aefbfefd517a3facc6dc0e0dc45ae5eb87.zip |
Get Python 2.6 working.
Signed-off-by: Dan O'Reilly <oreilldf@gmail.com>
Diffstat (limited to 'python/google/protobuf/internal/reflection_test.py')
-rwxr-xr-x | python/google/protobuf/internal/reflection_test.py | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/python/google/protobuf/internal/reflection_test.py b/python/google/protobuf/internal/reflection_test.py index 9fe3abee..8967dc2e 100755 --- a/python/google/protobuf/internal/reflection_test.py +++ b/python/google/protobuf/internal/reflection_test.py @@ -39,18 +39,10 @@ import copy import gc import operator import struct -import unittest try: - from unittest import skipIf + import unittest2 as unittest except ImportError: - def skipIf(predicate, message): - def decorator(wrapped): - if predicate: - def _noop(*args, **kw): - pass - return _noop - return wrapped - return decorator + import unittest import six @@ -1634,7 +1626,7 @@ class ReflectionTest(unittest.TestCase): self.assertFalse(proto.IsInitialized(errors)) self.assertEqual(errors, ['a', 'b', 'c']) - @skipIf( + @unittest.skipIf( api_implementation.Type() != 'cpp' or api_implementation.Version() != 2, 'Errors are only available from the most recent C++ implementation.') def testFileDescriptorErrors(self): @@ -2835,7 +2827,7 @@ class OptionsTest(unittest.TestCase): class ClassAPITest(unittest.TestCase): - @skipIf( + @unittest.skipIf( api_implementation.Type() == 'cpp' and api_implementation.Version() == 2, 'C++ implementation requires a call to MakeDescriptor()') def testMakeClassWithNestedDescriptor(self): |