# HG changeset patch # User Joerg Sonnenberger # Date 2018-10-08 19:53:32 # Node ID 8a08aefa9273e6f328f238e4793f9a43f314e471 # Parent 34d9846023e6de74ce64493efd1538379c4c6e5c tests: do not change sys.path, it can break loading cext.parsers When running this tests with run-tests, the prefix would resolve mercurial.cext to the source tree and the attempt to load mercurial.cext.parsers would therefore fail since it doesn't exist in it. With the regular search path from run-tests, it is picked up from the temporary prefix correctly. Differential Revision: https://phab.mercurial-scm.org/D4910 diff --git a/tests/test-lfs-pointer.py b/tests/test-lfs-pointer.py --- a/tests/test-lfs-pointer.py +++ b/tests/test-lfs-pointer.py @@ -1,11 +1,5 @@ from __future__ import absolute_import, print_function -import os -import sys - -# make it runnable using python directly without run-tests.py -sys.path[0:0] = [os.path.join(os.path.dirname(__file__), '..')] - # Import something from Mercurial, so the module loader gets initialized. from mercurial import pycompat del pycompat # unused for now diff --git a/tests/test-minifileset.py b/tests/test-minifileset.py --- a/tests/test-minifileset.py +++ b/tests/test-minifileset.py @@ -1,12 +1,6 @@ from __future__ import absolute_import from __future__ import print_function -import os -import sys - -# make it runnable directly without run-tests.py -sys.path[0:0] = [os.path.join(os.path.dirname(__file__), '..')] - from mercurial import minifileset def check(text, truecases, falsecases):