summaryrefslogtreecommitdiffstats
path: root/googlemock
diff options
context:
space:
mode:
Diffstat (limited to 'googlemock')
-rwxr-xr-xgooglemock/test/gmock_output_test.py13
-rwxr-xr-xgooglemock/test/gmock_test_utils.py6
2 files changed, 11 insertions, 8 deletions
diff --git a/googlemock/test/gmock_output_test.py b/googlemock/test/gmock_output_test.py
index eced8a8..9d73d57 100755
--- a/googlemock/test/gmock_output_test.py
+++ b/googlemock/test/gmock_output_test.py
@@ -31,11 +31,11 @@
"""Tests the text output of Google C++ Mocking Framework.
-SYNOPSIS
- gmock_output_test.py --build_dir=BUILD/DIR --gengolden
- # where BUILD/DIR contains the built gmock_output_test_ file.
- gmock_output_test.py --gengolden
- gmock_output_test.py
+To update the golden file:
+gmock_output_test.py --build_dir=BUILD/DIR --gengolden
+# where BUILD/DIR contains the built gmock_output_test_ file.
+gmock_output_test.py --gengolden
+gmock_output_test.py
"""
__author__ = 'wan@google.com (Zhanyong Wan)'
@@ -176,5 +176,8 @@ if __name__ == '__main__':
golden_file = open(GOLDEN_PATH, 'wb')
golden_file.write(output)
golden_file.close()
+ # Suppress the error "googletest was imported but a call to its main()
+ # was never detected."
+ os._exit(0)
else:
gmock_test_utils.Main()
diff --git a/googlemock/test/gmock_test_utils.py b/googlemock/test/gmock_test_utils.py
index 1983c53..b513000 100755
--- a/googlemock/test/gmock_test_utils.py
+++ b/googlemock/test/gmock_test_utils.py
@@ -34,7 +34,6 @@ __author__ = 'wan@google.com (Zhanyong Wan)'
import os
import sys
-
# Determines path to gtest_test_utils and imports it.
SCRIPT_DIR = os.path.dirname(__file__) or '.'
@@ -44,9 +43,10 @@ if os.path.isdir(gtest_tests_util_dir):
GTEST_TESTS_UTIL_DIR = gtest_tests_util_dir
else:
GTEST_TESTS_UTIL_DIR = os.path.join(SCRIPT_DIR, '../../googletest/test')
-
sys.path.append(GTEST_TESTS_UTIL_DIR)
-import gtest_test_utils # pylint: disable-msg=C6204
+
+# pylint: disable=C6204
+import gtest_test_utils
def GetSourceDir():