Ver código fonte

Fix Python 2.6 test failures.

Change-Id: Ia9e2795b1ff1abb30410ffb3ef96ba6f46dd99d0
Feng Xiao 9 anos atrás
pai
commit
a0b8fd52b9

+ 5 - 1
python/google/protobuf/internal/well_known_types_test.py

@@ -36,10 +36,14 @@ __author__ = 'jieluo@google.com (Jie Luo)'
 
 from datetime import datetime
 
+try:
+  import unittest2 as unittest
+except ImportError:
+  import unittest
+
 from google.protobuf import duration_pb2
 from google.protobuf import field_mask_pb2
 from google.protobuf import timestamp_pb2
-import unittest
 from google.protobuf import unittest_pb2
 from google.protobuf.internal import test_util
 from google.protobuf.internal import well_known_types