Patchwork D7623: tests: make test-config-env.py a little less hacky

login
register
mail settings
Submitter phabricator
Date Dec. 15, 2019, 3:11 a.m.
Message ID <809f72a89d748b12043c6eb1d2fa72ab@localhost.localdomain>
Download mbox | patch
Permalink /patch/43841/
State Not Applicable
Headers show

Comments

phabricator - Dec. 15, 2019, 3:11 a.m.
Closed by commit rHG527eba3013ea: tests: make test-config-env.py a little less hacky (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7623?vs=18653&id=18732

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7623/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7623

AFFECTED FILES
  tests/test-config-env.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers, indygreg
Cc: mercurial-devel

Patch

diff --git a/tests/test-config-env.py b/tests/test-config-env.py
--- a/tests/test-config-env.py
+++ b/tests/test-config-env.py
@@ -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):