aboutsummaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorPaul Yang <TeBoring@users.noreply.github.com>2015-07-09 15:13:12 -0700
committerPaul Yang <TeBoring@users.noreply.github.com>2015-07-09 15:13:12 -0700
commitfe50044041e8b8bc6b8d8183e8d043ed6dba403e (patch)
tree8475f940f97422dcba951238e93b16f223d94f0b /python
parent5a020d41a55d2ad44bf0e84c74ba91758ef5d016 (diff)
parent9f563bd0d8863da35524f7d0a6f87abb2ec228a3 (diff)
downloadprotobuf-fe50044041e8b8bc6b8d8183e8d043ed6dba403e.tar.gz
protobuf-fe50044041e8b8bc6b8d8183e8d043ed6dba403e.tar.bz2
protobuf-fe50044041e8b8bc6b8d8183e8d043ed6dba403e.zip
Merge pull request #570 from google/internal-third-party
Internal local modifications.
Diffstat (limited to 'python')
-rwxr-xr-xpython/google/protobuf/internal/test_util.py7
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 '