Protocol Buffers - Google's data interchange format (grpc依赖)
https://developers.google.com/protocol-buffers/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
844 B
30 lines
844 B
2 years ago
|
# Protocol Buffers - Google's data interchange format
|
||
|
# Copyright 2008 Google Inc. All rights reserved.
|
||
|
#
|
||
1 year ago
|
# Use of this source code is governed by a BSD-style
|
||
|
# license that can be found in the LICENSE file or at
|
||
|
# https://developers.google.com/open-source/licenses/bsd
|
||
2 years ago
|
"""Test that Kokoro is using the expected version of python."""
|
||
|
|
||
|
import os
|
||
|
import sys
|
||
2 years ago
|
import unittest
|
||
|
|
||
2 years ago
|
|
||
|
class PythonVersionTest(unittest.TestCase):
|
||
|
|
||
|
def testPython3(self):
|
||
|
"""Test that we can import nested import public messages."""
|
||
|
|
||
|
exp = os.getenv('KOKORO_PYTHON_VERSION', '')
|
||
2 years ago
|
if not exp:
|
||
|
print('No kokoro python version found, skipping check', file=sys.stderr)
|
||
2 years ago
|
return
|
||
2 years ago
|
self.assertTrue(
|
||
|
sys.version.startswith(exp),
|
||
|
'Expected Python %s but found Python %s' % (exp, sys.version))
|
||
2 years ago
|
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
unittest.main()
|