D4910: tests: do not change sys.path, it can break loading cext.parsers
joerg.sonnenberger (Joerg Sonnenberger)
phabricator at mercurial-scm.org
Tue Oct 9 08:22:57 EDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG8a08aefa9273: tests: do not change sys.path, it can break loading cext.parsers (authored by joerg.sonnenberger, committed by ).
CHANGED PRIOR TO COMMIT
https://phab.mercurial-scm.org/D4910?vs=11748&id=11768#toc
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D4910?vs=11748&id=11768
REVISION DETAIL
https://phab.mercurial-scm.org/D4910
AFFECTED FILES
tests/test-lfs-pointer.py
tests/test-minifileset.py
CHANGE DETAILS
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):
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
To: joerg.sonnenberger, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list