diff options
author | Bo Yang <teboring@google.com> | 2015-07-06 16:07:57 -0700 |
---|---|---|
committer | Bo Yang <teboring@google.com> | 2015-07-09 12:39:52 -0700 |
commit | 9f563bd0d8863da35524f7d0a6f87abb2ec228a3 (patch) | |
tree | 8475f940f97422dcba951238e93b16f223d94f0b /python | |
parent | 5a020d41a55d2ad44bf0e84c74ba91758ef5d016 (diff) |
Internal local modifications.
Diffstat (limited to 'python')
-rwxr-xr-x | python/google/protobuf/internal/test_util.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/python/google/protobuf/internal/test_util.py b/python/google/protobuf/internal/test_util.py index 0cbdbad9..fec65382 100755 --- a/python/google/protobuf/internal/test_util.py +++ b/python/google/protobuf/internal/test_util.py @@ -602,6 +602,13 @@ def GoldenFile(filename): return open(full_path, 'rb') path = os.path.join(path, '..') + # Search internally. + path = '.' + full_path = os.path.join(path, 'third_party/py/google/protobuf/testdata', filename) + if os.path.exists(full_path): + # Found it. Load the golden file from the testdata directory. + return open(full_path, 'rb') + raise RuntimeError( 'Could not find golden files. This test must be run from within the ' 'protobuf source package so that it can read test data files from the ' |