Mercurial > hg
changeset 40098:8a08aefa9273
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
author | Joerg Sonnenberger <joerg@bec.de> |
---|---|
date | Mon, 08 Oct 2018 21:53:32 +0200 |
parents | 34d9846023e6 |
children | 994010b87534 |
files | tests/test-lfs-pointer.py tests/test-minifileset.py |
diffstat | 2 files changed, 0 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-lfs-pointer.py Mon Oct 08 21:51:20 2018 +0200 +++ b/tests/test-lfs-pointer.py Mon Oct 08 21:53:32 2018 +0200 @@ -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
--- a/tests/test-minifileset.py Mon Oct 08 21:51:20 2018 +0200 +++ b/tests/test-minifileset.py Mon Oct 08 21:53:32 2018 +0200 @@ -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):