소스 검색

Fix Python 2.6 test failures.

Change-Id: Ia9e2795b1ff1abb30410ffb3ef96ba6f46dd99d0
Feng Xiao 9 년 전
부모
커밋
a0b8fd52b9
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      python/google/protobuf/internal/well_known_types_test.py

+ 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