check-py3-compat: use an absolute path in sys.path
The idea and rationale is similar to https://phab.mercurial-scm.org/D12599
(landed as
1b6e381521c5).
Differential Revision: https://phab.mercurial-scm.org/D12621
--- a/contrib/check-py3-compat.py Thu May 19 12:23:38 2022 +0100
+++ b/contrib/check-py3-compat.py Wed May 04 13:48:40 2022 +0400
@@ -105,7 +105,7 @@
# specified. When running as test-check-py3-compat.t, we technically
# would import the correct paths, but it's cleaner to have both cases
# use the same import logic.
- sys.path.insert(0, '.')
+ sys.path.insert(0, os.getcwd())
fn = check_compat_py3
for f in sys.argv[1:]: