tests: make test-config-env.py a little less hacky
Overriding os.path.isdir to always returns False is very
confusing. Let's make it more explicit by specifically not returning
any defaultrc/ configs.
Differential Revision: https://phab.mercurial-scm.org/D7623
--- a/tests/test-config-env.py Thu Dec 12 12:57:13 2019 -0800
+++ b/tests/test-config-env.py Thu Dec 12 09:59:03 2019 -0800
@@ -6,6 +6,7 @@
from mercurial import (
encoding,
+ extensions,
rcutil,
ui as uimod,
util,
@@ -35,9 +36,10 @@
return [join(b'userrc')]
+extensions.wrapfunction(rcutil, 'defaultrcpath', lambda orig: [])
+
rcutil.systemrcpath = systemrcpath
rcutil.userrcpath = userrcpath
-os.path.isdir = lambda x: False # hack: do not load default.d/*.rc
# utility to print configs
def printconfigs(env):