summaryrefslogtreecommitdiffstats
path: root/googlemock/test/gmock_test_utils.py
diff options
context:
space:
mode:
authorDerek Mauro <dmauro@google.com>2021-12-22 21:00:44 (GMT)
committerCopybara-Service <copybara-worker@google.com>2021-12-22 21:01:24 (GMT)
commitc58f562fa2b287ab58a51b702f3c7295efe89904 (patch)
tree1179004595ed2b972b83dc62ec5adb467c5f7dd9 /googlemock/test/gmock_test_utils.py
parent71d4e2f7423274d178b446e94b88082559f2fa7a (diff)
downloadgoogletest-c58f562fa2b287ab58a51b702f3c7295efe89904.zip
googletest-c58f562fa2b287ab58a51b702f3c7295efe89904.tar.gz
googletest-c58f562fa2b287ab58a51b702f3c7295efe89904.tar.bz2
Makes the Python imports consistently use full paths from the repository root,
unifying the behavior between Bazel and CMake This fixes one of the CI failures on Windows PiperOrigin-RevId: 417872531 Change-Id: I156989323b7e6d4a4420f4f9691b078829db933d
Diffstat (limited to 'googlemock/test/gmock_test_utils.py')
-rwxr-xr-xgooglemock/test/gmock_test_utils.py14
1 files changed, 1 insertions, 13 deletions
diff --git a/googlemock/test/gmock_test_utils.py b/googlemock/test/gmock_test_utils.py
index 7dc4e11..d7bc097 100755
--- a/googlemock/test/gmock_test_utils.py
+++ b/googlemock/test/gmock_test_utils.py
@@ -30,21 +30,9 @@
"""Unit test utilities for Google C++ Mocking Framework."""
import os
-import sys
-
-# Determines path to gtest_test_utils and imports it.
-SCRIPT_DIR = os.path.dirname(__file__) or '.'
-
-# isdir resolves symbolic links.
-gtest_tests_util_dir = os.path.join(SCRIPT_DIR, '../../googletest/test')
-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)
# pylint: disable=C6204
-import gtest_test_utils
+from googletest.test import gtest_test_utils
def GetSourceDir():